Skip to content

Latest commit

 

History

History
48 lines (35 loc) · 828 Bytes

README.md

File metadata and controls

48 lines (35 loc) · 828 Bytes

Dip Postgres

Postgres configuration for Dip infra services.

Usage

  1. Add a service to the application's dip.yml.
infra:
  postgres:
    git: https://github.com/bibendi/dip-postgres.git
  1. 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.

  1. Add a POSTGRES_URL environment variable and the postgres-net to a Docker Compose service.
services:
  app:
    environment:
      DATABASE_URL: postgres://postgres:keepinsecret@postgres:5432
    networks:
      - default
      - postgres-net
  1. Start infra services.
dip infra up
  1. Start the app
dip up