fix connectivity + entrypoint to install extensions
This commit is contained in:
parent
e0eff8c3fa
commit
d8580b4962
|
@ -7,7 +7,7 @@ LETS_ENCRYPT_ENV=production
|
||||||
|
|
||||||
ROOT_PATH=/var/www/html
|
ROOT_PATH=/var/www/html
|
||||||
PHP_VERSION=7.4
|
PHP_VERSION=7.4
|
||||||
# environment for PHP frameworks like laravel/symphony
|
# environment (needed for PHP frameworks like laravel/symphony)
|
||||||
APP_ENV=prod
|
APP_ENV=prod
|
||||||
|
|
||||||
## Extra extensions you need (run `abra app YOURAPPDOMAIN run app "php -m"` to see active extensions)
|
## Extra extensions you need (run `abra app YOURAPPDOMAIN run app "php -m"` to see active extensions)
|
||||||
|
|
|
@ -38,6 +38,8 @@ Coöp Cloud + [PHP](https://php.org) + MariaDB (optional) + Nginx = 🥳
|
||||||
|
|
||||||
## Extra
|
## 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 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"`
|
You can see the PHP config and environment by checking the output of `abra app YOURAPPDOMAIN run app "php -i"`
|
||||||
|
|
4
abra.sh
4
abra.sh
|
@ -1,7 +1,7 @@
|
||||||
# export PHP_VERSION=7.4
|
# export PHP_VERSION=7.4
|
||||||
export NGINX_DEFAULT_CONF_VERSION=v7
|
export NGINX_DEFAULT_CONF_VERSION=v7
|
||||||
export PHP_UPLOADS_CONF_VERSION=v3
|
export PHP_UPLOADS_CONF_VERSION=v4
|
||||||
export ENTRYPOINT_CONF_VERSION=v3
|
export ENTRYPOINT_CONF_VERSION=v1
|
||||||
export ENTRYPOINT_MAILRELAY_CONF_VERSION=v1
|
export ENTRYPOINT_MAILRELAY_CONF_VERSION=v1
|
||||||
export MSMTP_CONF_VERSION=v3
|
export MSMTP_CONF_VERSION=v3
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@ services:
|
||||||
volumes:
|
volumes:
|
||||||
- "mariadb:/var/lib/mysql"
|
- "mariadb:/var/lib/mysql"
|
||||||
networks:
|
networks:
|
||||||
- internal
|
- backend
|
||||||
environment:
|
environment:
|
||||||
- MYSQL_ROOT_PASSWORD_FILE=/run/secrets/db_root_password
|
- MYSQL_ROOT_PASSWORD_FILE=/run/secrets/db_root_password
|
||||||
- MYSQL_DATABASE=site
|
- MYSQL_DATABASE=site
|
||||||
|
|
12
compose.yml
12
compose.yml
|
@ -5,7 +5,8 @@ services:
|
||||||
volumes:
|
volumes:
|
||||||
- "site_content:/var/www/html/"
|
- "site_content:/var/www/html/"
|
||||||
networks:
|
networks:
|
||||||
- internal
|
- backend
|
||||||
|
- proxy
|
||||||
environment:
|
environment:
|
||||||
- PHP_EXTENSIONS
|
- PHP_EXTENSIONS
|
||||||
- APP_ENV
|
- APP_ENV
|
||||||
|
@ -23,9 +24,8 @@ services:
|
||||||
labels:
|
labels:
|
||||||
- coop-cloud.${STACK_NAME}.app.version=${PHP_VERSION}-92fac7ac
|
- coop-cloud.${STACK_NAME}.app.version=${PHP_VERSION}-92fac7ac
|
||||||
frontend:
|
frontend:
|
||||||
image: nginx:1.19.2
|
image: nginx:1.20-alpine
|
||||||
networks:
|
networks:
|
||||||
- internal
|
|
||||||
- proxy
|
- proxy
|
||||||
depends_on:
|
depends_on:
|
||||||
- app
|
- app
|
||||||
|
@ -42,7 +42,7 @@ services:
|
||||||
- "traefik.http.routers.${STACK_NAME}.middlewares=${STACK_NAME}-redirect"
|
- "traefik.http.routers.${STACK_NAME}.middlewares=${STACK_NAME}-redirect"
|
||||||
- "traefik.http.middlewares.${STACK_NAME}-redirect.headers.SSLForceHost=true"
|
- "traefik.http.middlewares.${STACK_NAME}-redirect.headers.SSLForceHost=true"
|
||||||
- "traefik.http.middlewares.${STACK_NAME}-redirect.headers.SSLHost=${DOMAIN}"
|
- "traefik.http.middlewares.${STACK_NAME}-redirect.headers.SSLHost=${DOMAIN}"
|
||||||
- coop-cloud.${STACK_NAME}.frontend.version=1.19.2-c628b67d
|
- coop-cloud.${STACK_NAME}.frontend.version=1.20-c628b67d
|
||||||
volumes:
|
volumes:
|
||||||
- site_content:/var/www/html/
|
- site_content:/var/www/html/
|
||||||
configs:
|
configs:
|
||||||
|
@ -58,8 +58,8 @@ services:
|
||||||
# retries: 10
|
# retries: 10
|
||||||
# start_period: 1m
|
# start_period: 1m
|
||||||
networks:
|
networks:
|
||||||
internal:
|
backend:
|
||||||
internal: true
|
# internal: true
|
||||||
proxy:
|
proxy:
|
||||||
external: true
|
external: true
|
||||||
volumes:
|
volumes:
|
||||||
|
|
|
@ -1,11 +1,10 @@
|
||||||
#!/bin/bash
|
#!/bin/sh
|
||||||
|
|
||||||
{{ if (env "PHP_EXTENSIONS") }}
|
{{ if (env "PHP_EXTENSIONS") }}
|
||||||
echo Installing PHP extensions {{ env "PHP_EXTENSIONS" }}
|
echo Installing PHP extensions: {{ env "PHP_EXTENSIONS" }}
|
||||||
docker-php-ext-install {{ env "PHP_EXTENSIONS" }}
|
docker-php-ext-install {{ env "PHP_EXTENSIONS" }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
if [ -n "$@" ]; then
|
exec "$@"
|
||||||
"$@"
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
php-fpm
|
|
@ -1,3 +1,5 @@
|
||||||
file_uploads = On
|
file_uploads = On
|
||||||
upload_max_filesize = 256M
|
upload_max_filesize = 256M
|
||||||
post_max_size = 256M
|
post_max_size = 256M
|
||||||
|
log_errors = On
|
||||||
|
error_log = /dev/stderr
|
Loading…
Reference in New Issue