working with secrets

This commit is contained in:
notplants
2025-11-04 14:15:59 -05:00
parent 6a0ebbd641
commit 8bda1893f3
3 changed files with 33 additions and 30 deletions

15
abra.sh
View File

@ -1,13 +1,20 @@
# Set any config versions here
# Docs: https://docs.coopcloud.tech/maintainers/handbook/#manage-configs
export ABRA_ENTRYPOINT_VERSION=v3
export ABRA_ENTRYPOINT_VERSION=v4
export NGINX_CONF_VERSION=v2
export PG_BACKUP_VERSION=v3
# environment() {
# # TODO: Add file_env here
# }
environment() {
[ -f /run/secrets/postgres_password ] && export DB_PASSWORD="$(cat /run/secrets/postgres_password)"
[ -f /run/secrets/postgres_password ] && export POSTGRES_PASSWORD="$(cat /run/secrets/postgres_password)"
[ -f /run/secrets/django_secret_key ] && export DJANGO_SECRET_KEY="$(cat /run/secrets/django_secret_key)"
[ -f /run/secrets/minio_root_password ] && export MINIO_ROOT_PASSWORD="$(cat /run/secrets/minio_root_password)"
[ -f /run/secrets/django_superuser_password ] && export DJANGO_SUPERUSER_PASSWORD="$(cat /run/secrets/django_superuser_password)"
[ -f /run/secrets/oidc_rp_client_secret ] && export OIDC_RP_CLIENT_SECRET="$(cat /run/secrets/oidc_rp_client_secret)"
[ -f /run/secrets/collaboration_server_secret ] && export COLLABORATION_SERVER_SECRET="$(cat /run/secrets/collaboration_server_secret)"
}
migrate() {
environment
python manage.py migrate --noinput
}