utilize docker compose --profile postgres, and POSTGRES_DOCKER var,
to enable/disable using dockerized postgres.
For using docker compose directly
Now, by default, docker compose ... will NOT run a dockerized postgres service. You must provide a valid DATABASE_URL in your environment.
To continue using the dockerized postgres service, all docker compose commands must include the flag --profile postgres
For using make
The Makefile will read POSTGRES_DOCKER in your env file. If it is false, it will not include the postgres docker service. However, if POSTGRES_DOCKER=true (defaults to true if unset), then make will run as before, including postgres docker service (via --profile postgres) in all of its actions.
TL;DR
To disable docker postgres, include POSTGRES_DOCKER=false in your .env (or prod.env).
To keep using docker postgres, do nothing (if using make), or amend any docker compose calls with --profile postgres.
utilize docker compose --profile postgres, and POSTGRES_DOCKER var, to enable/disable using dockerized postgres.
For using docker compose directly
Now, by default,
docker compose ...
will NOT run a dockerized postgres service. You must provide a valid DATABASE_URL in your environment. To continue using the dockerized postgres service, alldocker compose
commands must include the flag--profile postgres
For using make
The Makefile will read
POSTGRES_DOCKER
in your env file. If it isfalse
, it will not include the postgres docker service. However, ifPOSTGRES_DOCKER=true
(defaults to true if unset), then make will run as before, including postgres docker service (via--profile postgres
) in all of its actions.TL;DR
To disable docker postgres, include
POSTGRES_DOCKER=false
in your .env (or prod.env).To keep using docker postgres, do nothing (if using make), or amend any
docker compose
calls with--profile postgres
.Closes https://github.com/compdemocracy/polis/pull/1749 and https://github.com/compdemocracy/polis/issues/1751