Erect a SQL playground with docker compose
Friday, March 20, 2020
Docker Compose Modify this docker-compose.yml on your need.
version: '3.0' services: db: image: postgres:12.2-alpine restart: always volumes: - ./.persistence/db:/var/lib/postgresql/data environment: - POSTGRES_USER=kowalski # optional, "postgres" will be taken by default - POSTGRES_PASSWORD=114514 # modify it dashboard: image: dpage/pgadmin4:latest restart: always volumes: - ./.persistence/dashboard:/var/lib/pgadmin environment: - PGADMIN_DEFAULT_EMAIL=kowalski@local.domain # modify it - PGADMIN_DEFAULT_PASSWORD=114514 # modify it ports: - 80:80 depends_on: - db Persistence ./.persistence will be mounted for data persistence.
pgAdmin runs as the pgadmin user (UID: 5050) in the pgadmin group (GID: 5050) in the container.…more