1 Commits

5 changed files with 17 additions and 16 deletions

View File

@ -14,19 +14,20 @@ APP_ENV=prod
#COMPOSE_FILE=$COMPOSE_FILE:compose.version.yml
#PHP_VERSION=7.4-fpm-alpine
## Extra extensions you need as a space separated list (run `abra app YOURAPPDOMAIN run app "php -m"` to see already active extensions)
## Extra extensions you need (run `abra app YOURAPPDOMAIN run app "php -m"` to see active extensions)
PHP_EXTENSIONS="pdo_mysql"
## Uncomment to install more packages, space separated
#INSTALL_PACKAGES="libxslt-dev"
## Install libxslt, required for PHP `xsl` extension
#INSTALL_XSL=1
# Optional database
#COMPOSE_FILE="$COMPOSE_FILE:compose.mariadb.yml"
#SECRET_DB_ROOT_PASSWORD_VERSION=v1
#SECRET_DB_PASSWORD_VERSION=v1
# Optionally override database name and user
SECRET_DB_ROOT_PASSWORD_VERSION=v1
SECRET_DB_PASSWORD_VERSION=v1
# Optionally override database name and password
#DB_NAME=site
#DB_USER=site
# Local SMTP relay
#COMPOSE_FILE="$COMPOSE_FILE:compose.mailrelay.yml"
#SMTP_HOST="postfix_relay_app"

View File

@ -30,15 +30,15 @@ Coöp Cloud + [PHP](https://php.org) + MariaDB (optional) + Nginx = 🥳
- `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 cp YOURAPPDOMAIN - app:/var/www/html/`
7. Use [restore functionality](https://docs.coopcloud.tech/backup-restore/) to import a SQL file into the db
8. Open the configured domain in your browser to check all is good
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/`
6. Use [restore functionality](https://docs.coopcloud.tech/backup-restore/) to import a SQL file into the db
6. 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. The same for necessary packages with
`INSTALL_PACKAGES`
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"`

View File

@ -1,7 +1,7 @@
# export PHP_VERSION=7.4
export NGINX_DEFAULT_CONF_VERSION=v7
export PHP_UPLOADS_CONF_VERSION=v4
export ENTRYPOINT_CONF_VERSION=v2
export ENTRYPOINT_CONF_VERSION=v1
export ENTRYPOINT_MAILRELAY_CONF_VERSION=v1
export ENTRYPOINT_HTTPD_CONF_VERSION=v1
export HTTPD_VHOSTS_CONF_VERSION=v1

View File

@ -40,8 +40,8 @@ services:
- "traefik.http.routers.${STACK_NAME}.tls.certresolver=${LETS_ENCRYPT_ENV}"
# Redirect from EXTRA_DOMAINS to DOMAIN
- "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}"
- "traefik.http.middlewares.${STACK_NAME}-redirect.redirectscheme.scheme=https"
- "traefik.http.middlewares.${STACK_NAME}-redirect.redirectscheme.permanent=true"
- coop-cloud.${STACK_NAME}.frontend.version=1.20-c628b67d
volumes:
- site_content:/var/www/html/

View File

@ -1,7 +1,7 @@
#!/bin/sh
{{ if (env "INSTALL_PACKAGES") }}
apk add {{ env "INSTALL_PACKAGES" }}
{{ if (env "INSTALL_XSL") }}
apk add libxslt-dev
{{ end }}
{{ if (env "PHP_EXTENSIONS") }}