Skip to content

Instantly share code, notes, and snippets.

@kolosovpetro
Created December 30, 2021 11:14
Show Gist options
  • Select an option

  • Save kolosovpetro/c1d45789d0a269c6dfa55e1e3f706a9f to your computer and use it in GitHub Desktop.

Select an option

Save kolosovpetro/c1d45789d0a269c6dfa55e1e3f706a9f to your computer and use it in GitHub Desktop.
version: '3.4'
networks:
cqrs-api-docker-postgres-dev:
driver: bridge
services:
cqrs-api-docker-postgres-dev:
container_name: cqrs_api_postgres
image: cqrs-api-docker-postgres-dev:latest
depends_on:
- "postgres_image"
build:
context: .
dockerfile: Dockerfile
ports:
- "8000:80"
environment:
DB_CONNECTION_STRING: "host=postgres_db;port=5432;database=CqrsApiDatabase;username=postgres;password=postgres"
networks:
- cqrs-api-docker-postgres-dev
postgres_image:
container_name: postgres_db
image: postgres:latest
ports:
- "6000:5432"
restart: always
environment:
POSTGRES_USER: "postgres"
POSTGRES_PASSWORD: "postgres"
POSTGRES_DB: "CqrsApiDatabase"
networks:
- cqrs-api-docker-postgres-dev
volumes:
db_volume:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment