Skip to content

Commit

Permalink
Merge pull request #625 from wri/bump_postgresql_in_compose
Browse files Browse the repository at this point in the history
Replace PostgreSQL versions in compose files with those deployed to AWS
  • Loading branch information
dmannarino authored Feb 27, 2025
2 parents a09c347 + 6b2211f commit 77ef6b6
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 18 deletions.
18 changes: 9 additions & 9 deletions docker-compose.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ services:
- ./app:/app/app
- /var/run/docker.sock:/var/run/docker.sock:ro
environment:
- 'DB_WRITER_SECRET={"host": "database_12", "port": 5432, "username": "gfw", "password": "postgres", "dbname": "geostore"}'
- DB_HOST=database_12
- 'DB_WRITER_SECRET={"host": "database_14", "port": 5432, "username": "gfw", "password": "postgres", "dbname": "geostore"}'
- DB_HOST=database_14
- DATABASE=geostore
- DB_USER=gfw
- DB_PASSWORD=postgres # pragma: allowlist secret
- DB_PORT=5432
- DB_HOST_RO=database_12
- DB_HOST_RO=database_14
- DATABASE_RO=geostore
- DB_USER_RO=gfw_readonly
- DB_PASSWORD_RO=readonly # pragma: allowlist secret
Expand Down Expand Up @@ -56,11 +56,11 @@ services:
- "8008:80"
entrypoint: wait_for_postgres.sh /app/start.sh
depends_on:
- database_12
- database_14

database_12:
container_name: gfw-data-api-database_12
image: postgis/postgis:12-3.3-alpine
database_14:
container_name: gfw-data-api-database_14
image: postgis/postgis:14-3.4-alpine
restart: on-failure
ports:
- "54320:5432"
Expand All @@ -69,7 +69,7 @@ services:
- POSTGRES_USER=gfw
- POSTGRES_PASSWORD=postgres # pragma: allowlist secret
volumes:
- database_data_12:/var/lib/postgresql/data
- database_data_14:/var/lib/postgresql/data

volumes:
database_data_12:
database_data_14:
2 changes: 1 addition & 1 deletion docker-compose.prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ services:

database:
container_name: gfw-data-api-database
image: postgis/postgis:12-3.3-alpine
image: postgis/postgis:14-3.4-alpine
restart: on-failure
ports:
- "54320:5432"
Expand Down
16 changes: 8 additions & 8 deletions docker-compose.test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ services:
environment:
- PYTHONPATH=batch/python
- ENV=test
- DB_HOST=test_database_12
- DB_HOST=test_database_14
- DATABASE=_test
- DB_USER=gfw
- DB_PASSWORD=postgres # pragma: allowlist secret
- DB_PORT=5432
- DB_HOST_RO=test_database_12
- DB_HOST_RO=test_database_14
- DATABASE_RO=_test
- DB_USER_RO=gfw_readonly
- DB_PASSWORD_RO=readonly # pragma: allowlist secret
Expand Down Expand Up @@ -66,12 +66,12 @@ services:
- AWS_SECRETSMANAGER_URL=http://motoserver:50000
entrypoint: wait_for_postgres.sh pytest --timeout 480 -vv --cov-report term
depends_on:
- test_database_12
- test_database_14
- motoserver

test_database_12:
container_name: gfw-data-api-test-database-12
image: postgis/postgis:12-3.3-alpine
test_database_14:
container_name: gfw-data-api-test-database-14
image: postgis/postgis:14-3.4-alpine
ports:
- "54321:5432"
environment:
Expand All @@ -80,7 +80,7 @@ services:
- POSTGRES_USER=gfw
- POSTGRES_PASSWORD=postgres # pragma: allowlist secret
volumes:
- test_database_data_12:/var/lib/postgresql/data
- test_database_data_14:/var/lib/postgresql/data
command: ["postgres", "-c", "log_statement=all"]
restart: on-failure

Expand All @@ -95,4 +95,4 @@ services:
restart: on-failure

volumes:
test_database_data_12:
test_database_data_14:

0 comments on commit 77ef6b6

Please sign in to comment.