From 9e9fbd2c84c0c23fd8b9b410a8c8103b182ddb72 Mon Sep 17 00:00:00 2001 From: Pablo Costa Date: Mon, 19 Aug 2024 21:27:34 -0300 Subject: [PATCH] Remove MONGODB_HOST environment variable from backup scripts --- .github/workflows/db-backup-private.yml | 1 - .github/workflows/db-backup-public.yml | 1 - docker-db-backup/README.md | 2 -- docker-db-backup/bin/backup.sh | 1 - 4 files changed, 5 deletions(-) diff --git a/.github/workflows/db-backup-private.yml b/.github/workflows/db-backup-private.yml index af327522c1..d72d9f38f7 100644 --- a/.github/workflows/db-backup-private.yml +++ b/.github/workflows/db-backup-private.yml @@ -60,7 +60,6 @@ jobs: -e CLOUDFLARE_R2_WRITE_SECRET_ACCESS_KEY="${{ secrets.CLOUDFLARE_R2_WRITE_SECRET_ACCESS_KEY }}" \ -e CLOUDFLARE_R2_BUCKET_NAME="${{ vars.CLOUDFLARE_R2_BUCKET_NAME }}" \ -e BACKUPFILE_PREFIX="backup" \ - -e MONGODB_HOST="mongo" \ -e MONGODB_URI="mongodb+srv://${{ secrets.MONGO_BACKUP_USER }}:${{ secrets.MONGO_BACKUP_USER_PASSWORD }}@aiiddev-aqdmh.gcp.mongodb.net/aiidprod" \ -e MONGODB_DBNAME="aiidprod" \ -e MONGODB_URI_TRANSLATIONS="mongodb+srv://${{ secrets.MONGO_BACKUP_USER }}:${{ secrets.MONGO_BACKUP_USER_PASSWORD }}@aiiddev-aqdmh.gcp.mongodb.net/translations" \ diff --git a/.github/workflows/db-backup-public.yml b/.github/workflows/db-backup-public.yml index 0360f45704..08e14efea0 100644 --- a/.github/workflows/db-backup-public.yml +++ b/.github/workflows/db-backup-public.yml @@ -60,7 +60,6 @@ jobs: -e CLOUDFLARE_R2_WRITE_SECRET_ACCESS_KEY="${{ secrets.CLOUDFLARE_R2_WRITE_SECRET_ACCESS_KEY }}" \ -e CLOUDFLARE_R2_BUCKET_NAME="${{ vars.CLOUDFLARE_R2_BUCKET_NAME }}" \ -e BACKUPFILE_PREFIX="backup" \ - -e MONGODB_HOST="mongo" \ -e MONGODB_URI="${{ secrets.MONGODB_CONNECTION_STRING }}" \ -e MONGODB_DBNAME="aiidprod" \ -e MONGODB_DBNAME_TRANSLATIONS="translations" \ diff --git a/docker-db-backup/README.md b/docker-db-backup/README.md index 056d456bc4..130a12109b 100644 --- a/docker-db-backup/README.md +++ b/docker-db-backup/README.md @@ -31,7 +31,6 @@ docker run --rm \ -e CLOUDFLARE_R2_BUCKET_NAME= \ [ -e BACKUPFILE_PREFIX= \ ] - [ -e MONGODB_HOST= \ ] [ -e MONGODB_DBNAME= \ ] [ -e MONGODB_USERNAME= \ ] [ -e MONGODB_PASSWORD= \ ] @@ -68,7 +67,6 @@ Environment variables | --------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | | BACKUPFILE_PREFIX | Prefix of Backup Filename | "backup" | | MONGODB_URI | Target MongoDB URI (ex. `mongodb://mongodb?replicaSet=rs0`). If set, the other `MONGODB_*` variables will be ignored. | - | -| MONGODB_HOST | Target MongoDB Host | "mongo" | | MONGODB_DBNAME | Target DB name | - | | MONGODB_USERNAME | DB login username | - | | MONGODB_PASSWORD | DB login password | - | diff --git a/docker-db-backup/bin/backup.sh b/docker-db-backup/bin/backup.sh index 0bf783d2e0..8f888046d2 100755 --- a/docker-db-backup/bin/backup.sh +++ b/docker-db-backup/bin/backup.sh @@ -5,7 +5,6 @@ echo "Starting backup.sh script execution..." # settings IS_PUBLIC_BACKUP=${IS_PUBLIC_BACKUP:-false} BACKUPFILE_PREFIX=${BACKUPFILE_PREFIX:-backup} -MONGODB_HOST=${MONGODB_HOST:-mongo} CRONMODE=${CRONMODE:-false} CLOUDFLARE_R2_ACCOUNT_ID=${CLOUDFLARE_R2_ACCOUNT_ID} if [ "${IS_PUBLIC_BACKUP}" == "true" ]; then