Custom PHP application
Go to file
3wc 868f85fb2a Switch category → "Development"
[ci skip]
2023-03-28 11:39:39 -04:00
.drone.yml Switch to self-hosted stack-ssh-deploy image [mass update] 2023-01-21 11:49:55 -08:00
.env.sample fix connectivity + entrypoint to install extensions 2021-09-07 20:21:16 +12:00
.gitignore Update for Current Exciting Sep 2020 Best-Practice 2020-09-11 01:30:10 +02:00
LICENSE Init this new WP setup 2020-05-03 00:21:33 +02:00
README.md Switch category → "Development" 2023-03-28 11:39:39 -04:00
abra.sh fix connectivity + entrypoint to install extensions 2021-09-07 20:21:16 +12:00
compose.mailrelay.yml Unbreak mailrelay config 2021-06-02 11:20:24 +02:00
compose.mariadb.yml fix connectivity + entrypoint to install extensions 2021-09-07 20:21:16 +12:00
compose.smtp.yml Fix syntax 2021-06-02 11:22:54 +02:00
compose.yml fix connectivity + entrypoint to install extensions 2021-09-07 20:21:16 +12:00
entrypoint.mailrelay.sh.tmpl Various un-breaking 2020-10-24 20:13:56 +02:00
entrypoint.sh.tmpl fix connectivity + entrypoint to install extensions 2021-09-07 20:21:16 +12:00
msmtp.conf.tmpl Add missing from 2021-06-02 08:36:52 +02:00
nginx.conf configurable php version, root_path, fix db host 2021-07-14 23:57:43 +02:00
renovate.json Add renovate.json 2020-09-14 20:03:20 +00:00
uploads.ini fix connectivity + entrypoint to install extensions 2021-09-07 20:21:16 +12:00

README.md

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

  1. Set up Docker Swarm and abra
  2. Deploy coop-cloud/traefik
  3. abra app new custom-php --secrets (optionally with --pass if you'd like to save secrets in pass)
  4. 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'));
  5. Deploy with abra app deploy YOURAPPDOMAIN
  6. 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/
  7. Use restore functionality to import a SQL file into the db
  8. 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"

Email

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.

  1. Deploy postfix-relay
  2. abra app config YOURAPPDOMAIN, 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 deploy YOURAPPDOMAIN