run migrations automatically on backend startup (AUTO_MIGRATIONS)
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.
This commit is contained in:
@@ -4,6 +4,7 @@ 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
|
||||
@@ -11,8 +12,7 @@ environment() {
|
||||
}
|
||||
|
||||
migrate() {
|
||||
environment
|
||||
python manage.py migrate --noinput
|
||||
/migrate.sh
|
||||
}
|
||||
|
||||
trigger_wopi() {
|
||||
|
||||
Reference in New Issue
Block a user