From 1144f4fef3d1be71cdeb7bab69d887d64148ce45 Mon Sep 17 00:00:00 2001 From: 3wc <3wc@doesthisthing.work> Date: Wed, 11 Jun 2025 15:32:30 +0100 Subject: [PATCH] Move backend migration to abra.sh command --- README.md | 1 + TODO.md | 2 +- abra.sh | 8 ++++++++ compose.yml | 11 ----------- 4 files changed, 10 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 60cd248..cd5d228 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,7 @@ * `abra app new lasuite-docs --secrets` * `abra app config ` * `abra app deploy ` +* `abra app cmd backend migrate` For more, see [`docs.coopcloud.tech`](https://docs.coopcloud.tech). diff --git a/TODO.md b/TODO.md index f608715..78921e4 100644 --- a/TODO.md +++ b/TODO.md @@ -5,7 +5,7 @@ - [x] Fix image uploads - [ ] Update recipe metadata - [x] External OIDC server (+ move options to `.env.sample`) -- [ ] Customisable Django `DJANGO_SECRET_KEY` and `DJANGO_SUPERUSER_PASSWORD` +- [x] Customisable Django `DJANGO_SECRET_KEY` and `DJANGO_SUPERUSER_PASSWORD` - [ ] Versioned recipe release ## Should diff --git a/abra.sh b/abra.sh index 8bdccaa..0a818c9 100755 --- a/abra.sh +++ b/abra.sh @@ -1,3 +1,11 @@ # Set any config versions here # Docs: https://docs.coopcloud.tech/maintainers/handbook/#manage-configs export NGINX_CONF_VERSION=v2 + +# environment() { +# # TODO: Add file_env here +# } + +migrate() { + python manage.py migrate --noinput +} diff --git a/compose.yml b/compose.yml index 1f08010..0e221d7 100644 --- a/compose.yml +++ b/compose.yml @@ -99,7 +99,6 @@ services: - backend environment: <<: [*common-env, *postgres-env, *yprovider-env] - DJANGO_CONFIGURATION: Production healthcheck: test: ["CMD", "python", "manage.py", "check"] interval: 15s @@ -107,15 +106,6 @@ services: retries: 20 start_period: 10s - # backend-migration: - # image: lasuite/impress-backend:v3.3.0 - # networks: - # - backend - # command: ["python", "manage.py", "migrate", "--noinput"] - # environment: - # <<: [*common-env, *postgres-env, *yprovider-env] - # DJANGO_CONFIGURATION: Production - celery: image: lasuite/impress-backend:v3.3.0 networks: @@ -123,7 +113,6 @@ services: command: ["celery", "-A", "impress.celery_app", "worker", "-l", "INFO"] environment: <<: [*common-env, *postgres-env, *yprovider-env] - DJANGO_CONFIGURATION: Production y-provider: image: lasuite/impress-y-provider:v3.3.0