2019-07-12 01:54:33 +00:00
|
|
|
# NOTE: This docker-compose.yml is meant to be just an example guideline
|
|
|
|
# on how you can achieve the same. It is not intented to run out of the box
|
|
|
|
# and you must edit the below configurations to suit your needs.
|
|
|
|
|
|
|
|
version: "3.7"
|
|
|
|
|
2019-07-12 08:20:44 +00:00
|
|
|
x-app-defaults: &app-defaults
|
|
|
|
restart: unless-stopped
|
|
|
|
image: listmonk/listmonk:latest
|
|
|
|
ports:
|
|
|
|
- "9000:9000"
|
|
|
|
networks:
|
|
|
|
- listmonk
|
|
|
|
|
|
|
|
x-db-defaults: &db-defaults
|
2019-07-12 01:54:33 +00:00
|
|
|
image: postgres:11
|
|
|
|
ports:
|
2019-07-12 08:20:44 +00:00
|
|
|
- "9432:5432"
|
2019-07-12 01:54:33 +00:00
|
|
|
networks:
|
|
|
|
- listmonk
|
|
|
|
environment:
|
|
|
|
- POSTGRES_PASSWORD=listmonk
|
|
|
|
- POSTGRES_USER=listmonk
|
|
|
|
- POSTGRES_DB=listmonk
|
|
|
|
restart: unless-stopped
|
|
|
|
|
2019-07-12 08:20:44 +00:00
|
|
|
services:
|
|
|
|
db:
|
|
|
|
<<: *db-defaults
|
|
|
|
volumes:
|
|
|
|
- type: volume
|
|
|
|
source: listmonk-data
|
|
|
|
target: /var/lib/postgresql/data
|
|
|
|
|
2019-07-12 01:54:33 +00:00
|
|
|
app:
|
2019-07-12 08:20:44 +00:00
|
|
|
<<: *app-defaults
|
2019-07-12 01:54:33 +00:00
|
|
|
depends_on:
|
|
|
|
- db
|
2019-07-12 08:20:44 +00:00
|
|
|
|
|
|
|
demo-db:
|
|
|
|
<<: *db-defaults
|
|
|
|
|
|
|
|
demo-app:
|
|
|
|
<<: *app-defaults
|
|
|
|
command: [sh, -c, "yes | ./listmonk --install && ./listmonk"]
|
|
|
|
depends_on:
|
|
|
|
- demo-db
|
2019-07-12 01:54:33 +00:00
|
|
|
|
|
|
|
networks:
|
|
|
|
listmonk:
|
|
|
|
|
|
|
|
volumes:
|
|
|
|
listmonk-data:
|