Skip to content

Instantly share code, notes, and snippets.

@Sunit-Kulkarni
Forked from tingwei628/docker-compose.yml
Created November 5, 2019 04:27
Show Gist options
  • Save Sunit-Kulkarni/ed5154aabd3a343ee92478e9063cdedd to your computer and use it in GitHub Desktop.
Save Sunit-Kulkarni/ed5154aabd3a343ee92478e9063cdedd to your computer and use it in GitHub Desktop.
use postgresql and pgAdmin in docker
version: "3.4"
services:
pgAdmin:
restart: always
image: dpage/pgadmin4
ports:
- "8000:80"
environment:
PGADMIN_DEFAULT_EMAIL: 1234@admin.com
PGADMIN_DEFAULT_PASSWORD: 1234
volumes:
- pgadmin:/var/lib/pgadmin
postgres:
restart: always
image: postgres
container_name: "postgres_container"
ports:
- "5432:5432"
environment:
POSTGRES_USER: me
POSTGRES_PASSWORD: 1234
POSTGRES_DB: testDb
volumes:
- pgvol:/var/lib/postgresql/data
volumes:
pgvol:
pgadmin:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment