feature: add possibility to install more packages

This commit is contained in:
2025-11-24 11:12:37 +01:00
parent f36580483c
commit 9d98655ae1
4 changed files with 14 additions and 15 deletions

View File

@ -14,20 +14,19 @@ APP_ENV=prod
#COMPOSE_FILE=$COMPOSE_FILE:compose.version.yml
#PHP_VERSION=7.4-fpm-alpine
## Extra extensions you need (run `abra app YOURAPPDOMAIN run app "php -m"` to see active extensions)
## Extra extensions you need as a space separated list (run `abra app YOURAPPDOMAIN run app "php -m"` to see already active extensions)
PHP_EXTENSIONS="pdo_mysql"
## Install libxslt, required for PHP `xsl` extension
#INSTALL_XSL=1
## Uncomment to install more packages, space separated
#INSTALL_PACKAGES="libxslt-dev"
# 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 password
#SECRET_DB_ROOT_PASSWORD_VERSION=v1
#SECRET_DB_PASSWORD_VERSION=v1
# Optionally override database name and user
#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 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
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
## Extra
Indicate extensions you need in the `PHP_EXTENSIONS` env var. The entrypoint script will install them on startup.
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`
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=v1
export ENTRYPOINT_CONF_VERSION=v2
export ENTRYPOINT_MAILRELAY_CONF_VERSION=v1
export ENTRYPOINT_HTTPD_CONF_VERSION=v1
export HTTPD_VHOSTS_CONF_VERSION=v1

View File

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