DEV: Simplify discourse_dev postgres setup (#830)
authorDavid Taylor <david@taylorhq.com>
Mon, 19 Aug 2024 15:44:23 +0000 (16:44 +0100)
committerGitHub <noreply@github.com>
Mon, 19 Aug 2024 15:44:23 +0000 (16:44 +0100)
commitf1c9d8afb2408a289588a768ae32bb24ad62a73c
treee1977ac5166514239dee6dde590996383f14054d
parent6f8c17dbf4def3c991626b51eb9e33ccd92b2296
DEV: Simplify discourse_dev postgres setup (#830)

- Remove manual database creation, and instead promote discourse user to postgres SUPERUSER. This means that `db:drop` and `db:create` commands can be run in the dev image, just like in other local development environments. As well as simplifying things, it fixes turbo_rspec, which was previously impossible in the docker dev environment (because `discourse` didn't have permissions to create the parallel databases)

- Stop pre-migrating test database in dev image. It adds additional build time & image size, and doesn't actually help because core's `bin/docker/boot_dev` script overwrites the container's postgres directory with a volume mount
image/discourse_dev/postgres_dev.template.yml