diff --git a/docs/dev/Database-Tips.md b/docs/dev/Database-Tips.md index 17f9faa227..e0a70fec9f 100644 --- a/docs/dev/Database-Tips.md +++ b/docs/dev/Database-Tips.md @@ -17,7 +17,7 @@ Access a PostgreSQL shell inside the fmtm-db container: ```bash GIT_BRANCH=development -docker exec -it fmtm-db-${GIT_BRANCH} psql -U fmtm fmtm +docker exec -it fmtm-${GIT_BRANCH}-fmtm-db-1 psql -U fmtm fmtm ``` And then connect to the database using this command: diff --git a/docs/dev/Production.md b/docs/dev/Production.md index 496909cfec..18399de112 100644 --- a/docs/dev/Production.md +++ b/docs/dev/Production.md @@ -102,13 +102,13 @@ backup_filename="fmtm-db-${GIT_BRANCH}-$(date +'%Y-%m-%d').sql.gz" echo $backup_filename docker exec -i -e PGPASSWORD=PASSWORD_HERE \ -fmtm-db-${GIT_BRANCH} \ +fmtm-${GIT_BRANCH}-fmtm-db-1 \ pg_dump --verbose --format c -U fmtm fmtm \ | gzip -9 > "$backup_filename" # For ODK docker exec -i -e PGPASSWORD=PASSWORD_HERE \ -fmtm-central-db-${GIT_BRANCH} \ +fmtm-${GIT_BRANCH}-central-db-1 \ pg_dump --verbose --format c -U odk odk | \ gzip -9 > "$backup_filename" ``` @@ -130,13 +130,13 @@ backup_filename=fmtm-db-${GIT_BRANCH}-XXXX-XX-XX-sql.gz cat "$backup_filename" | gunzip | \ docker exec -i -e PGPASSWORD=NEW_PASSWORD_HERE \ -fmtm-db-${GIT_BRANCH} \ +fmtm-${GIT_BRANCH}-fmtm-db-1 \ pg_restore --verbose -U fmtm -d fmtm # For ODK cat "$backup_filename" | gunzip | \ docker exec -i -e PGPASSWORD=NEW_PASSWORD_HERE \ -fmtm-central-db-${GIT_BRANCH} \ +fmtm-${GIT_BRANCH}-central-db-1 \ pg_restore --verbose -U odk -d odk ``` @@ -162,7 +162,7 @@ backup_filename=fmtm-central-db-${GIT_BRANCH}-XXXX-XX-XX-sql.gz cat "$backup_filename" | gunzip | \ docker exec -i \ -fmtm-central-db-${GIT_BRANCH} \ +fmtm-${GIT_BRANCH}-central-db-1 \ pg_restore --verbose -U odk -d odk # Restore fmtm from the backup @@ -170,7 +170,7 @@ backup_filename=fmtm-db-${GIT_BRANCH}-XXXX-XX-XX-sql.gz cat "$backup_filename" | gunzip | \ docker exec -i \ -fmtm-db-${GIT_BRANCH} \ +fmtm-${GIT_BRANCH}-fmtm-db-1 \ pg_restore --verbose -U fmtm -d fmtm # Run the entire docker compose stack