working other than minio_root_password_file
This commit is contained in:
17
compose.yml
17
compose.yml
@ -76,7 +76,9 @@ x-yprovider-env: &yprovider-env
|
||||
|
||||
x-minio-env: &minio-env
|
||||
MINIO_ROOT_USER: user
|
||||
MINIO_ROOT_PASSWORD_FILE: /run/secrets/minio_rp
|
||||
# MINIO_ROOT_PASSWORD supplied by secrets
|
||||
# TODO: switch to using password_file (currently only works with env var)
|
||||
# MINIO_ROOT_PASSWORD_FILE: /run/secrets/minio_rp
|
||||
|
||||
services:
|
||||
app:
|
||||
@ -179,8 +181,6 @@ services:
|
||||
PGDATA: var/lib/postgresql/data/pgdata
|
||||
volumes:
|
||||
- postgres:/var/lib/postgresql/data/pgdata
|
||||
command: ["postgres"]
|
||||
entrypoint: ["/abra-entrypoint.sh", "docker-entrypoint.sh"]
|
||||
deploy:
|
||||
labels:
|
||||
backupbot.backup: "${ENABLE_BACKUPS:-true}"
|
||||
@ -191,15 +191,7 @@ services:
|
||||
- source: pg_backup
|
||||
target: /pg_backup.sh
|
||||
mode: 0555
|
||||
- source: abra_entrypoint
|
||||
target: /abra-entrypoint.sh
|
||||
mode: 0555
|
||||
secrets:
|
||||
- django_sk
|
||||
- django_sp
|
||||
- oidc_rpcs
|
||||
- collab_ss
|
||||
- minio_rp
|
||||
- postgres_p
|
||||
|
||||
redis:
|
||||
@ -212,8 +204,7 @@ services:
|
||||
image: minio/mc:RELEASE.2025-05-21T01-59-54Z
|
||||
environment: *minio-env
|
||||
networks:
|
||||
- backend
|
||||
# entrypoint: ["/abra-entrypoint.sh"]
|
||||
- backend
|
||||
entrypoint: >
|
||||
sh -c "MINIO_ROOT_PASSWORD=\"\$$(cat /run/secrets/minio_rp)\" &&
|
||||
/usr/bin/mc alias set docs http://minio:9000 \$${MINIO_ROOT_USER} \"\$${MINIO_ROOT_PASSWORD}\" &&
|
||||
|
||||
@ -5,8 +5,7 @@ set -e
|
||||
BACKUP_FILE='/var/lib/postgresql/data/pgdata/backup.sql'
|
||||
|
||||
function backup {
|
||||
# export PGPASSWORD=$(cat $POSTGRES_PASSWORD_FILE)
|
||||
export PGPASSWORD="$POSTGRES_PASSWORD"
|
||||
export PGPASSWORD=$(cat $POSTGRES_PASSWORD_FILE)
|
||||
pg_dump -U ${POSTGRES_USER} ${POSTGRES_DB} > $BACKUP_FILE
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user