Skip to content

Instantly share code, notes, and snippets.

@skyrocketeer
Created August 20, 2020 17:52
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 skyrocketeer/0f0cff799fb5f99f852ae668c49dada3 to your computer and use it in GitHub Desktop.
Save skyrocketeer/0f0cff799fb5f99f852ae668c49dada3 to your computer and use it in GitHub Desktop.
Example docker file with postgres sql service, mail server (mailhog) and redis
version: "1"
services:
example-db:
image: postgres:12
ports:
- "35432:5432"
volumes:
- /docker/postgres/:/docker-entrypoint-initdb.d
container_name: docker-example
environment:
- "POSTGRES_USER=postgres"
- "POSTGRES_PASSWORD=postgres"
- "TZ:Asia/Tokyo"
- "spring.profiles.active:docker"
smtp:
image: mailhog/mailhog
container_name: 'mailhog'
ports:
- "1025:1025"
- "8025:8025"
restart: always
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment