Skip to content

Commit

Permalink
Remove MONGODB_HOST environment variable from backup scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
pdcp1 committed Aug 20, 2024
1 parent 87b8af6 commit 9e9fbd2
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 5 deletions.
1 change: 0 additions & 1 deletion .github/workflows/db-backup-private.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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" \
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/db-backup-public.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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" \
Expand Down
2 changes: 0 additions & 2 deletions docker-db-backup/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ docker run --rm \
-e CLOUDFLARE_R2_BUCKET_NAME=<Cloudflare R2 bucket name (ie: "aiid-public")> \
[ -e BACKUPFILE_PREFIX=<Prefix of Backup Filename (default: "backup") \ ]
[ -e MONGODB_URI=<Target MongoDB URI> \ ]
[ -e MONGODB_HOST=<Target MongoDB Host (default: "mongo")> \ ]
[ -e MONGODB_DBNAME=<Target DB name> \ ]
[ -e MONGODB_USERNAME=<DB login username> \ ]
[ -e MONGODB_PASSWORD=<DB login password> \ ]
Expand Down Expand Up @@ -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 | - |
Expand Down
1 change: 0 additions & 1 deletion docker-db-backup/bin/backup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 9e9fbd2

Please sign in to comment.