Add a migrate.sh config (ported from lasuite-docs) that the backend entrypoint runs when AUTO_MIGRATIONS=true (default). It loads secrets, waits for the DB, and idempotently applies pending migrations via 'migrate --check' then 'migrate --noinput'. The manual 'abra app cmd backend migrate' now delegates to the same script.
23 lines
475 B
Bash
Executable File
23 lines
475 B
Bash
Executable File
# Set any config versions here
|
|
# Docs: https://docs.coopcloud.tech/maintainers/handbook/#manage-configs
|
|
export ABRA_ENTRYPOINT_VERSION=v11
|
|
export NGINX_CONF_VERSION=v6
|
|
export ONLYOFFICE_CONF_VERSION=v2
|
|
export PG_BACKUP_VERSION=v4
|
|
export MIGRATE_VERSION=v1
|
|
|
|
environment() {
|
|
# this exports all the secrets as environment variables
|
|
source /abra-entrypoint.sh -e
|
|
}
|
|
|
|
migrate() {
|
|
/migrate.sh
|
|
}
|
|
|
|
trigger_wopi() {
|
|
environment
|
|
python manage.py trigger_wopi_configuration
|
|
}
|
|
|