Recommended PostgreSQL docker-compose service configuration

I use the following docker-compose.yml service:

With the following .env:

Using .env has the huge advantage that other services like my backup script can access the configuration in a standardized manner using environment variables.


Check out similar posts by category: Container, Databases, Docker