Dip Postgres
March 7, 2024 ยท View on GitHub
Postgres configuration for Dip infra services.
Usage
- Add a service to the application's
dip.yml.
infra:
postgres:
git: https://github.com/bibendi/dip-postgres.git
- Add a network to the application's
docker-compose.yml.
networks:
postgres-net:
name: ${DIP_INFRA_NETWORK_POSTGRES}
external: true
Where DIP_INFRA_NETWORK_POSTGRES is a special variable that is set by Dip.
- Add a
POSTGRES_URLenvironment variable and thepostgres-netto a Docker Compose service.
services:
app:
environment:
DATABASE_URL: postgres://postgres:keepinsecret@postgres:5432
networks:
- default
- postgres-net
- Start infra services.
dip infra up
- Start the app
dip up