hcb icon indicating copy to clipboard operation
hcb copied to clipboard

Add docker-compose for running postgres-15 without destroying postgres-11 data

Open albertchae opened this issue 1 year ago • 1 comments

  • Add an overlay docker-compose.postgres-12.yml which allows us to run a postgres-12 docker container instead of postgres-11
  • Add --pg-12 to docker_dev_setup.sh, which lets devs set up a fresh database on postgres 12
  • Add --pg-12 to docker_start.sh which lets devs run their web container against the postgres 12 container
  • Add upgrade_docker_postgres_11_to_12.sh, a script which should upgrade a dev's database non destructively. We have configured the postgres-12 container to use a volume with the version (pg-12-data), so we won't destroy the old volume and can roll back if necessary. This script dumps the data from the old volume and loads it into pg-12-data volume and adds it to the database.

albertchae avatar Mar 25 '24 10:03 albertchae

note to self: double check dev containers https://github.com/hackclub/hcb/pull/4202#issuecomment-1933574265

albertchae avatar Mar 27 '24 04:03 albertchae

We decided to switch to 15 by nuking postgres 11 data in development and reseeding. https://github.com/hackclub/hcb/pull/11032

garyhtou avatar Oct 02 '25 19:10 garyhtou