This repository has been archived on 2021-07-22. You can view files and clone it, but cannot push or open issues or pull requests.
custom-php/README.md

51 lines
1.8 KiB
Markdown
Raw Normal View History

2021-07-14 19:03:49 +00:00
# custom-php
2020-05-02 22:21:33 +00:00
2020-09-25 13:06:35 +00:00
2021-07-14 10:38:58 +00:00
Coöp Cloud + [PHP](https://php.org) + MariaDB + Nginx = 🥳
<!-- metadata -->
2021-05-10 05:09:52 +00:00
- **Category**: Apps
- **Status**: ❶💚
2021-07-14 11:29:07 +00:00
- **Image**: [`php`](https://hub.docker.com/_/php), ❶💚, upstream
2021-05-10 05:09:52 +00:00
- **Healthcheck**: Yes
- **Backups**: Yes
- **Email**: ❶💚
- **Tests**: ❷💛
- **SSO**: No
2021-05-30 10:58:17 +00:00
<!-- endmetadata -->
## Basic usage
1. Set up Docker Swarm and [`abra`][abra]
2020-12-14 10:28:46 +00:00
2. Deploy [`coop-cloud/traefik`][cc-traefik]
2021-07-14 19:03:49 +00:00
3. `abra app new custom-php --secrets` (optionally with `--pass` if you'd like
to save secrets in `pass`)
2020-12-14 10:28:46 +00:00
4. `abra app YOURAPPDOMAIN config` - be sure to change `$DOMAIN` to something that resolves to
your Docker swarm box
2021-05-10 05:09:52 +00:00
5. `abra app YOURAPPDOMAIN deploy`
2021-07-14 11:57:41 +00:00
6. Copy your site files using something like: `abra app YOURAPPDOMAIN cp index.html app:/var/www/html/` or if you want to copy an entire directory: `tar cf - ./mysite | abra app YOURAPPDOMAIN cp - app:/var/www/html/`
2021-07-14 10:38:58 +00:00
6. Use [restore functionality](https://docs.coopcloud.tech/backup-restore/) to import a SQL file into the db
6. Open the configured domain in your browser to check all is good
2020-09-14 17:28:31 +00:00
2020-09-27 19:27:08 +00:00
## Email
2021-06-02 09:26:03 +00:00
There is a local or remote SMTP relay configuration available.
- **local**: `COMPOSE_FILE=compose.yml:compose.mailrelay.yml`
- **remote**: `COMPOSE_FILE=compose.yml:compose.mailrelay.yml:compose.smtp.yml`
Below are the instructions for the local relay.
2020-12-14 10:28:46 +00:00
1. Deploy [`postfix-relay`][cc-postfix-relay]
2. `abra app YOURAPPDOMAIN config`, and uncomment the email lines; change
`MAIL_FROM` to make sure the domain is the same as `postfix-relay`'s
`$DOMAIN` or in its `$EXTRA_SENDER_DOMAINS`
3. `abra app YOURAPPDOMAIN deploy`
2020-09-27 19:27:08 +00:00
[abra]: https://git.autonomic.zone/autonomic-cooperative/abra
2020-12-14 10:28:46 +00:00
[cc-traefik]: https://git.autonomic.zone/coop-cloud/traefik
[cc-postfix-relay]: https://git.autonomic.zone/coop-cloud/traefik