2024-10-04 12:58:22 +08:00
|
|
|
# NOTE: This docker-compose.yml is an example setup.
|
|
|
|
# It is not intented to run out of the box
|
2019-07-12 09:54:33 +08:00
|
|
|
# and you must edit the below configurations to suit your needs.
|
2024-10-04 12:58:22 +08:00
|
|
|
# See https://listmonk.app/docs/installation/#manual-docker-install_1
|
2019-07-12 09:54:33 +08:00
|
|
|
|
2019-07-12 16:20:44 +08:00
|
|
|
x-app-defaults: &app-defaults
|
|
|
|
restart: unless-stopped
|
|
|
|
image: listmonk/listmonk:latest
|
|
|
|
ports:
|
|
|
|
- "9000:9000"
|
|
|
|
networks:
|
|
|
|
- listmonk
|
2021-12-29 14:12:04 +08:00
|
|
|
environment:
|
|
|
|
- TZ=Etc/UTC
|
2019-07-12 16:20:44 +08:00
|
|
|
|
|
|
|
x-db-defaults: &db-defaults
|
2024-05-26 02:33:41 +08:00
|
|
|
image: postgres:14-alpine
|
2021-04-11 15:28:43 +08:00
|
|
|
ports:
|
|
|
|
- "9432:5432"
|
|
|
|
networks:
|
|
|
|
- listmonk
|
|
|
|
environment:
|
|
|
|
- POSTGRES_PASSWORD=listmonk
|
|
|
|
- POSTGRES_USER=listmonk
|
|
|
|
- POSTGRES_DB=listmonk
|
|
|
|
restart: unless-stopped
|
2021-06-14 21:50:13 +08:00
|
|
|
healthcheck:
|
|
|
|
test: ["CMD-SHELL", "pg_isready -U listmonk"]
|
|
|
|
interval: 10s
|
|
|
|
timeout: 5s
|
|
|
|
retries: 6
|
2019-07-12 09:54:33 +08:00
|
|
|
|
2019-07-12 16:20:44 +08:00
|
|
|
services:
|
|
|
|
db:
|
|
|
|
<<: *db-defaults
|
2021-06-14 21:50:13 +08:00
|
|
|
container_name: listmonk_db
|
2019-07-12 16:20:44 +08:00
|
|
|
volumes:
|
|
|
|
- type: volume
|
|
|
|
source: listmonk-data
|
|
|
|
target: /var/lib/postgresql/data
|
|
|
|
|
2019-07-12 09:54:33 +08:00
|
|
|
app:
|
2019-07-12 16:20:44 +08:00
|
|
|
<<: *app-defaults
|
2021-06-14 21:50:13 +08:00
|
|
|
container_name: listmonk_app
|
2024-08-28 00:41:49 +08:00
|
|
|
hostname: listmonk.example.com # Recommend using FQDN for hostname
|
2019-07-12 09:54:33 +08:00
|
|
|
depends_on:
|
|
|
|
- db
|
2021-06-14 21:50:13 +08:00
|
|
|
volumes:
|
|
|
|
- ./config.toml:/listmonk/config.toml
|
2019-07-12 16:20:44 +08:00
|
|
|
|
|
|
|
demo-db:
|
2021-06-14 21:50:13 +08:00
|
|
|
container_name: listmonk_demo_db
|
2019-07-12 16:20:44 +08:00
|
|
|
<<: *db-defaults
|
|
|
|
|
|
|
|
demo-app:
|
|
|
|
<<: *app-defaults
|
2021-06-14 21:50:13 +08:00
|
|
|
container_name: listmonk_demo_app
|
2020-07-09 01:08:31 +08:00
|
|
|
command: [sh, -c, "yes | ./listmonk --install --config config-demo.toml && ./listmonk --config config-demo.toml"]
|
2021-04-11 15:28:43 +08:00
|
|
|
depends_on:
|
2019-07-12 16:20:44 +08:00
|
|
|
- demo-db
|
2019-07-12 09:54:33 +08:00
|
|
|
|
|
|
|
networks:
|
|
|
|
listmonk:
|
|
|
|
|
|
|
|
volumes:
|
|
|
|
listmonk-data:
|