Skip to content

Instantly share code, notes, and snippets.

@dewdad
Last active December 12, 2018 05:19
Show Gist options
  • Save dewdad/d2af1c7ee0984e5dcc43a465b430f73e to your computer and use it in GitHub Desktop.
Save dewdad/d2af1c7ee0984e5dcc43a465b430f73e to your computer and use it in GitHub Desktop.
docker-compose file for PostgreSQL and Adminer that works on Windows
version: "3.7"
volumes:
postgres-data:
services:
database:
image: postgres:11-alpine
restart: always
expose:
- "5432"
volumes:
- postgres-data:/var/lib/postgresql/data
ports:
- "5432:5432"
environment:
# POSTGRES_DB: '${DB_NAME}'
# POSTGRES_USER: '${DB_USER}'
# POSTGRES_PASSWORD: '${DB_PASSWORD}'
POSTGRES_DB: "test"
POSTGRES_USER: "test"
POSTGRES_PASSWORD: "pass"
# env_file:
# - .env.development
# the Server will be the name service of the running DB you want to connect to,
# in this case "database"
adminer:
image: adminer:latest
restart: always
ports:
- "8280:8080"
environment:
ADMINER_DEFAULT_SERVER: database
ADMINER_DESIGN: lucas-sandery
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment