Custom PHP application
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Mayel d8580b4962 fix connectivity + entrypoint to install extensions 2 months ago
.drone.yml rename to custom-php 3 months ago
.env.sample fix connectivity + entrypoint to install extensions 2 months ago
.gitignore Update for Current Exciting Sep 2020 Best-Practice 1 year ago
LICENSE Init this new WP setup 2 years ago
README.md fix connectivity + entrypoint to install extensions 2 months ago
abra.sh fix connectivity + entrypoint to install extensions 2 months ago
compose.mailrelay.yml Various un-breaking 1 year ago
compose.mariadb.yml fix connectivity + entrypoint to install extensions 2 months ago
compose.smtp.yml Fix syntax 5 months ago
compose.yml fix connectivity + entrypoint to install extensions 2 months ago
entrypoint.mailrelay.sh.tmpl Various un-breaking 1 year ago
entrypoint.sh.tmpl fix connectivity + entrypoint to install extensions 2 months ago
msmtp.conf.tmpl Add missing from 5 months ago
nginx.conf configurable php version, root_path, fix db host 3 months ago
renovate.json Add renovate.json 1 year ago
uploads.ini fix connectivity + entrypoint to install extensions 2 months ago

README.md

custom-php

Coöp Cloud + PHP + MariaDB (optional) + Nginx = 🥳

  • Category: Apps
  • Status: ❶💚
  • Image: php, ❶💚, upstream
  • Healthcheck: Yes
  • Backups: Yes
  • Email: ❶💚
  • Tests: ❷💛
  • 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 YOURAPPDOMAIN config
    • 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 YOURAPPDOMAIN deploy
  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 - -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 YOURAPPDOMAIN run app "php -m"

You can see the PHP config and environment by checking the output of abra app YOURAPPDOMAIN run 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 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