From 1500ca7324b9d739145455d74b794f1458c746e2 Mon Sep 17 00:00:00 2001 From: Mayel Date: Tue, 7 Sep 2021 16:53:11 +1200 Subject: [PATCH] attempt to install pdo_mysql php ext --- .env.sample | 4 ++-- README.md | 9 +++++++++ abra.sh | 2 +- compose.mariadb.yml | 1 + compose.yml | 8 ++++---- entrypoint.sh.tmpl | 1 + 6 files changed, 18 insertions(+), 7 deletions(-) diff --git a/.env.sample b/.env.sample index e822063..f491bb6 100644 --- a/.env.sample +++ b/.env.sample @@ -10,8 +10,8 @@ PHP_VERSION=7.4 # environment for PHP frameworks like laravel/symphony APP_ENV=prod -## Extra extensions you need -#PHP_EXTENSIONS="calendar" +## Extra extensions you need (run `abra app YOURAPPDOMAIN run app "php -m"` to see active extensions) +PHP_EXTENSIONS="pdo_mysql" # Optional database #COMPOSE_FILE="compose.yml:compose.mariadb.yml" diff --git a/README.md b/README.md index e05c6a1..73509cb 100644 --- a/README.md +++ b/README.md @@ -36,6 +36,15 @@ Coöp Cloud + [PHP](https://php.org) + MariaDB (optional) + Nginx = 🥳 6. Open the configured domain in your browser to check all is good +## Extra + +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. diff --git a/abra.sh b/abra.sh index 5ead69a..45d2dec 100644 --- a/abra.sh +++ b/abra.sh @@ -1,7 +1,7 @@ # export PHP_VERSION=7.4 export NGINX_DEFAULT_CONF_VERSION=v7 export PHP_UPLOADS_CONF_VERSION=v3 -export ENTRYPOINT_CONF_VERSION=v2 +export ENTRYPOINT_CONF_VERSION=v3 export ENTRYPOINT_MAILRELAY_CONF_VERSION=v1 export MSMTP_CONF_VERSION=v3 diff --git a/compose.mariadb.yml b/compose.mariadb.yml index 03a873f..dd9eb23 100644 --- a/compose.mariadb.yml +++ b/compose.mariadb.yml @@ -3,6 +3,7 @@ services: app: environment: - DB_HOST=${STACK_NAME}_db + # - DB_HOST=db - DB_USER=site - DB_PASSWORD_FILE=/run/secrets/db_password - DB_NAME=site diff --git a/compose.yml b/compose.yml index d3fa41d..839bbdc 100644 --- a/compose.yml +++ b/compose.yml @@ -12,10 +12,10 @@ services: configs: - source: php_uploads_conf target: /usr/local/etc/php/conf.d/uploads.ini - # - source: entrypoint_conf - # target: /docker-entrypoint.sh - # mode: 0555 - # entrypoint: /docker-entrypoint.sh + - source: entrypoint_conf + target: /docker-entrypoint.sh + mode: 0555 + entrypoint: /docker-entrypoint.sh deploy: update_config: failure_action: rollback diff --git a/entrypoint.sh.tmpl b/entrypoint.sh.tmpl index 11d93f7..6f4ab1a 100644 --- a/entrypoint.sh.tmpl +++ b/entrypoint.sh.tmpl @@ -1,6 +1,7 @@ #!/bin/bash {{ if (env "PHP_EXTENSIONS") }} +echo Installing PHP extensions {{ env "PHP_EXTENSIONS" }} docker-php-ext-install {{ env "PHP_EXTENSIONS" }} {{ end }}