Skip to content

Instantly share code, notes, and snippets.

@nubilfi
Created January 14, 2020 04:25
Show Gist options
  • Save nubilfi/3be3049d9f7f40b2360c67f5e535f0cc to your computer and use it in GitHub Desktop.
Save nubilfi/3be3049d9f7f40b2360c67f5e535f0cc to your computer and use it in GitHub Desktop.
# postgre-env.list
POSTGRES_USER=postgres
POSTGRES_PASSWORD=your_pg_password
# pgadmin-env.list
PGADMIN_DEFAULT_EMAIL=your_pgadmin_email@email.com
PGADMIN_DEFAULT_PASSWORD=your_pgadmin_password
# docker-compose.yml
version: '3.7'
services:
database:
image: postgres:11-alpine
container_name: postgres
hostname: postgres
env_file:
- ./postgre-env.list
volumes:
- postgresvolume:/pgdata
ports:
- '5432:5432'
networks:
- postgrenetwork
pgadmin4:
image: dpage/pgadmin4:latest
container_name: pgadmin4
hostname: pgadmin4
env_file:
- ./pgadmin-env.list
volumes:
- pgadminvolume:/var/lib/pgadmin
ports:
- '8088:80'
networks:
- postgrenetwork
networks:
postgrenetwork:
volumes:
postgresvolume:
pgadminvolume:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment