Skip to content

Commit

Permalink
upgrade postgres to 16.4
Browse files Browse the repository at this point in the history
## 🎫 Ticket

https://jira.cms.gov/browse/DPC-4396

## 🛠 Changes

db in docker compose upgraded to postgres 16.4 to match deployed
environments

## ℹ️ Context

As part of CSRAP, our databases are being upgraded to postgres 16.4. Our
testing and development environments should match it.

## 🧪 Validation

Passes ci
  • Loading branch information
jdettmannnava authored Nov 14, 2024
1 parent 1ebacb4 commit ca9ebf9
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 11 deletions.
7 changes: 4 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
services:

db:
image: postgres:14
image: postgres:16.4
command: postgres -c 'max_connections=250'
environment:
- POSTGRES_MULTIPLE_DATABASES=dpc_attribution,dpc_queue,dpc_auth,dpc_consent,dpc-website_development,bcda,dpc-portal_development
Expand All @@ -12,7 +12,8 @@ services:
# based on the POSTGRES_MULTIPLE_DATABASES variable above.
- ./docker/postgres:/docker-entrypoint-initdb.d
# Mount persistent volume to ensure data is not erased across containers.
- pgdata14:/var/lib/postgresql/data
- pgdata16:/var/lib/postgresql/data
- ./tmp:/var/tmp

aggregation:
image: ${ECR_HOST:-755619740999.dkr.ecr.us-east-1.amazonaws.com/dpc-aggregation}:latest
Expand Down Expand Up @@ -117,7 +118,7 @@ services:
network_mode: host

volumes:
pgdata14:
pgdata16:
export-volume:
driver: local
driver_opts:
Expand Down
2 changes: 1 addition & 1 deletion dpc-admin-portal-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ set -e

function _finally {
docker compose -p start-v1-portals -f docker-compose.yml -f docker-compose.portals.yml down
docker volume rm start-v1-portals_pgdata14
docker volume rm start-v1-portals_pgdata16
}
trap _finally EXIT

Expand Down
2 changes: 1 addition & 1 deletion dpc-portal-accessibility-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ set -e

function _finally {
docker compose -p start-v1-portals -f docker-compose.yml -f docker-compose.portals.yml down
docker volume rm start-v1-portals_pgdata14
docker volume rm start-v1-portals_pgdata16
}
trap _finally EXIT

Expand Down
2 changes: 1 addition & 1 deletion dpc-portal-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ set -e

function _finally {
docker compose -p start-v1-portals -f docker-compose.yml -f docker-compose.portals.yml down
docker volume rm start-v1-portals_pgdata14
docker volume rm start-v1-portals_pgdata16
}
trap _finally EXIT

Expand Down
2 changes: 1 addition & 1 deletion dpc-portals-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ set -e

function _finally {
docker compose -p start-v1-portals -f docker-compose.yml -f docker-compose.portals.yml down
docker volume rm start-v1-portals_pgdata14
docker volume rm start-v1-portals_pgdata16
}
trap _finally EXIT

Expand Down
6 changes: 3 additions & 3 deletions dpc-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ set +o allexport

function _finally {
docker compose -p start-v1-app down
docker volume rm start-v1-app_pgdata14
docker volume rm start-v1-app_pgdata16
}

trap _finally EXIT
Expand Down Expand Up @@ -45,15 +45,15 @@ if [ -n "$REPORT_COVERAGE" ]; then
fi

docker compose -p start-v1-app down
docker volume rm start-v1-app_pgdata14
docker volume rm start-v1-app_pgdata16
docker compose -p start-v1-app up start_core_dependencies
docker compose -p start-v1-app up start_api_dependencies

# Run the integration tests
docker compose -p start-v1-app up --exit-code-from tests tests

docker compose -p start-v1-app down
docker volume rm start-v1-app_pgdata14
docker volume rm start-v1-app_pgdata16
docker compose -p start-v1-app up start_core_dependencies
docker compose -p start-v1-app up start_api_dependencies

Expand Down
2 changes: 1 addition & 1 deletion dpc-web-portal-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ set -e

function _finally {
docker compose -p start-v1-portals -f docker-compose.yml -f docker-compose.portals.yml down
docker volume rm start-v1-portals_pgdata14
docker volume rm start-v1-portals_pgdata16
}
trap _finally EXIT

Expand Down

0 comments on commit ca9ebf9

Please sign in to comment.