Skip to content

Instantly share code, notes, and snippets.

@DominicFinn
Created June 4, 2020 15:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DominicFinn/be47aa34ac8727647fc61b03f6390b00 to your computer and use it in GitHub Desktop.
Save DominicFinn/be47aa34ac8727647fc61b03f6390b00 to your computer and use it in GitHub Desktop.
docker-compose up
version: '3.5'
services:
seq.logging:
container_name: seq
image: datalust/seq
networks:
- postgres
environment:
- ACCEPT_EULA=Y
ports:
- "5300:80" # UI
- "5301:5341" # Data ingest
postgres:
container_name: postgres_container
image: postgres
environment:
POSTGRES_USER: ${POSTGRES_USER:-postgres}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-postgrespassword}
PGDATA: /data/postgres
volumes:
- postgres:/data/postgres
- ./init.sql:/docker-entrypoint-initdb.d/init.sql
ports:
- "5432:5432"
networks:
- postgres
restart: unless-stopped
pgadmin:
container_name: pgadmin_container
image: dpage/pgadmin4
environment:
PGADMIN_DEFAULT_EMAIL: ${PGADMIN_DEFAULT_EMAIL:-login@login.com}
PGADMIN_DEFAULT_PASSWORD: ${PGADMIN_DEFAULT_PASSWORD:-password}
volumes:
- pgadmin:/root/.pgadmin
ports:
- "${PGADMIN_PORT:-5050}:80"
networks:
- postgres
restart: unless-stopped
networks:
postgres:
driver: bridge
volumes:
postgres:
pgadmin:
CREATE DATABASE thing;
CREATE USER user_thing WITH PASSWORD 'password';
GRANT ALL PRIVILEGES ON DATABASE "thing" to user_thing;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment