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
|
||||
PHP_VERSION=7.4
|
||||
# environment for PHP frameworks like laravel/symphony
|
||||
# environment (needed for PHP frameworks like laravel/symphony)
|
||||
APP_ENV=prod
|
||||
|
||||
## 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
|
||||
|
||||
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"`
|
||||
|
|
4
abra.sh
4
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=v3
|
||||
export PHP_UPLOADS_CONF_VERSION=v4
|
||||
export ENTRYPOINT_CONF_VERSION=v1
|
||||
export ENTRYPOINT_MAILRELAY_CONF_VERSION=v1
|
||||
export MSMTP_CONF_VERSION=v3
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ services:
|
|||
volumes:
|
||||
- "mariadb:/var/lib/mysql"
|
||||
networks:
|
||||
- internal
|
||||
- backend
|
||||
environment:
|
||||
- MYSQL_ROOT_PASSWORD_FILE=/run/secrets/db_root_password
|
||||
- MYSQL_DATABASE=site
|
||||
|
|
12
compose.yml
12
compose.yml
|
@ -5,7 +5,8 @@ services:
|
|||
volumes:
|
||||
- "site_content:/var/www/html/"
|
||||
networks:
|
||||
- internal
|
||||
- backend
|
||||
- proxy
|
||||
environment:
|
||||
- PHP_EXTENSIONS
|
||||
- APP_ENV
|
||||
|
@ -23,9 +24,8 @@ services:
|
|||
labels:
|
||||
- coop-cloud.${STACK_NAME}.app.version=${PHP_VERSION}-92fac7ac
|
||||
frontend:
|
||||
image: nginx:1.19.2
|
||||
image: nginx:1.20-alpine
|
||||
networks:
|
||||
- internal
|
||||
- proxy
|
||||
depends_on:
|
||||
- app
|
||||
|
@ -42,7 +42,7 @@ services:
|
|||
- "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.SSLHost=${DOMAIN}"
|
||||
- coop-cloud.${STACK_NAME}.frontend.version=1.19.2-c628b67d
|
||||
- coop-cloud.${STACK_NAME}.frontend.version=1.20-c628b67d
|
||||
volumes:
|
||||
- site_content:/var/www/html/
|
||||
configs:
|
||||
|
@ -58,8 +58,8 @@ services:
|
|||
# retries: 10
|
||||
# start_period: 1m
|
||||
networks:
|
||||
internal:
|
||||
internal: true
|
||||
backend:
|
||||
# internal: true
|
||||
proxy:
|
||||
external: true
|
||||
volumes:
|
||||
|
|
|
@ -1,11 +1,10 @@
|
|||
#!/bin/bash
|
||||
#!/bin/sh
|
||||
|
||||
{{ 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" }}
|
||||
{{ end }}
|
||||
|
||||
if [ -n "$@" ]; then
|
||||
"$@"
|
||||
fi
|
||||
exec "$@"
|
||||
|
||||
php-fpm
|
|
@ -1,3 +1,5 @@
|
|||
file_uploads = On
|
||||
upload_max_filesize = 256M
|
||||
post_max_size = 256M
|
||||
log_errors = On
|
||||
error_log = /dev/stderr
|
Loading…
Reference in New Issue