hcb
hcb copied to clipboard
Add docker-compose for running postgres-15 without destroying postgres-11 data
- Add an overlay
docker-compose.postgres-12.ymlwhich allows us to run a postgres-12 docker container instead of postgres-11 - Add
--pg-12todocker_dev_setup.sh, which lets devs set up a fresh database on postgres 12 - Add
--pg-12todocker_start.shwhich 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.
note to self: double check dev containers https://github.com/hackclub/hcb/pull/4202#issuecomment-1933574265
We decided to switch to 15 by nuking postgres 11 data in development and reseeding. https://github.com/hackclub/hcb/pull/11032