Skip to content

Instantly share code, notes, and snippets.

@tjmaynes
Created October 12, 2021 18:01
Show Gist options
  • Save tjmaynes/c34dcc0d839ac19a780960a64dbd7943 to your computer and use it in GitHub Desktop.
Save tjmaynes/c34dcc0d839ac19a780960a64dbd7943 to your computer and use it in GitHub Desktop.
version: '3.1'
services:
my-service-db:
image: "postgres:11.5-alpine"
restart: always
volumes:
- my-service-volume:/var/lib/postgresql/data/
- ./db:/docker-entrypoint-initdb.d/
networks:
- my-service-network
ports:
- "5432:5432"
environment:
POSTGRES_HOST: localhost
POSTGRES_DB: my-service
POSTGRES_USER: root
POSTGRES_PASSWORD: postgres
volumes:
my-service-volume:
networks:
my-service-network:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment