Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
set up a postgres container properly
I just learned this is how you're actually supposed to do it in order to mimic a real deployment as closely as possible. If you read the documentation for this docker image, you'll find that the user created via `POSTGRES_USER` has `SUPERUSER` rights. Generally, real deployments don't and shouldn't have this set for the database user of random services (such as Lemmy). The proper way to do this is to use the defaults and add an init script that adds the actual service user and database to this specific directory. This results in the Lemmy service user not having `SUPERUSER`, which ensures that future migrations aren't written with the worrying assumption that people will grant it `SUPERUSER` rights. It also breaks the existing migrations because this exact mistake has been made already. I did this by adding a new `docker-compose.yml` to the repo root for two reasons: 1. It's more convenient to invoke when located here 2. I don't really know what's going on in `docker/docker-compose.yml` and what all it's used for, so I opted not to mess with it Obviously this is suboptimal, but it gets the point across. Please point out to me the proper way to make this change and I'll amend this commit.
- Loading branch information