Custom PHP application
release | ||
.drone.yml | ||
.env.sample | ||
.gitignore | ||
abra.sh | ||
compose.httpd.yml | ||
compose.mailrelay.yml | ||
compose.mariadb.yml | ||
compose.smtp.yml | ||
compose.yml | ||
entrypoint.httpd.sh | ||
entrypoint.mailrelay.sh.tmpl | ||
entrypoint.sh.tmpl | ||
httpd-vhosts.conf | ||
LICENSE | ||
msmtp.conf.tmpl | ||
nginx.conf | ||
README.md | ||
renovate.json | ||
uploads.ini |
custom-php
Coöp Cloud + PHP + MariaDB (optional) + Nginx = 🥳
- Category: Development
- Status: 3, stable
- Image:
php
, 4, upstream - Healthcheck: Yes
- Backups: Yes
- Email: 3
- Tests: 2
- SSO: No
Basic usage
- Set up Docker Swarm and
abra
- Deploy
coop-cloud/traefik
abra app new custom-php --secrets
(optionally with--pass
if you'd like to save secrets inpass
)abra app config YOURAPPDOMAIN
- be sure to change
$DOMAIN
to something that resolves to your Docker swarm box - if you need to enable the optional database, uncomment
COMPOSE_FILE="compose.yml:compose.mariadb.yml"
in which case configure your site to load the DB credentials from env:getenv('DB_NAME');
getenv('DB_HOST');
getenv('DB_USER');
@file_get_contents(getenv('DB_PASSWORD_FILE'));
- be sure to change
- Deploy with
abra app deploy YOURAPPDOMAIN
- Copy your site files using something like:
abra app cp YOURAPPDOMAIN index.html app:/var/www/html/
or if you want to copy an entire directory:tar -cf - -C my_site/path/here . | abra app YOURAPPDOMAIN cp - app:/var/www/html/
- Use restore functionality to import a SQL file into the db
- Open the configured domain in your browser to check all is good
Extra
Indicate extensions you need in the PHP_EXTENSIONS
env var. The entrypoint script will install them on startup.
You can see what PHP extensions compiled into the image by checking the output of abra app run YOURAPPDOMAIN app "php -m"
You can see the PHP config and environment by checking the output of abra app run YOURAPPDOMAIN app "php -i"
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.
- Deploy
postfix-relay
abra app config YOURAPPDOMAIN
, and uncomment the email lines; changeMAIL_FROM
to make sure the domain is the same aspostfix-relay
's$DOMAIN
or in its$EXTRA_SENDER_DOMAINS
abra app deploy YOURAPPDOMAIN