Skip to content

Commit

Permalink
Upgrade Postgres from 12.5 to 17-bullseye
Browse files Browse the repository at this point in the history
Add second volume mount for old data.
ignore-skip

ignore-skip

ignore-skip
  • Loading branch information
NickPhura committed Nov 14, 2024
1 parent 390d5c3 commit b2aa189
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 2 deletions.
1 change: 1 addition & 0 deletions compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ services:
- POSTGRES_PASSWORD=${DB_ADMIN_PASS}
- POSTGRES_DB=${DB_DATABASE}
- PORT=5432
- PGDATA=${PG_DATA}
networks:
- sims-network
volumes:
Expand Down
5 changes: 4 additions & 1 deletion database/.docker/db/Dockerfile.setup
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,7 @@ RUN npm ci --include=dev
USER 1001

# run the database migrations and seeding
CMD [ "npm", "run", "setup" ]
# CMD [ "npm", "run", "setup" ]

# TODO - Temporarily disable the dockerfile from running the setup script
CMD ["echo", "Done"]
4 changes: 3 additions & 1 deletion database/.pipeline/templates/db.dc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ parameters:
value: 'biohubbc'
- name: PGDATA
description: Path to PostgreSQL data directory
value: '/var/lib/pgsql/data/userdata'
value: '/var/lib/postgresql/data/17'
required: false
- name: TZ
description: Database timezone
Expand Down Expand Up @@ -197,6 +197,8 @@ objects:
securityContext: {}
terminationMessagePath: '/dev/termination-log'
volumeMounts:
- name: '${DATABASE_SERVICE_NAME}-data'
mountPath: '/var/lib/postgresql/data'
- name: '${DATABASE_SERVICE_NAME}-data'
mountPath: '/var/lib/pgsql/data'
# - name: '${DATABASE_SERVICE_NAME}-run'
Expand Down
1 change: 1 addition & 0 deletions env_config/env.docker
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ DB_DATABASE=biohubbc
DB_SCHEMA=biohub
DB_SCHEMA_DAPI_V1=biohub_dapi_v1
DB_TZ=America/Vancouver
PG_DATA=/var/lib/postgresql/data/17

# ------------------------------------------------------------------------------
# KeyCloak Configuration for Keycloak Common Hosted Single Sign-on (CSS)
Expand Down

0 comments on commit b2aa189

Please sign in to comment.