2022-09-29 12:27:49 +00:00
|
|
|
---
|
|
|
|
version: "3.7"
|
|
|
|
|
|
|
|
services:
|
|
|
|
app:
|
|
|
|
restart: unless-stopped
|
|
|
|
image: listmonk/listmonk:latest
|
|
|
|
networks:
|
|
|
|
- internal
|
|
|
|
- proxy
|
|
|
|
environment:
|
|
|
|
- TZ=Etc/UTC
|
|
|
|
- LISTMONK_DB_HOST=db
|
|
|
|
depends_on:
|
|
|
|
- db
|
|
|
|
configs:
|
|
|
|
- source: config_toml
|
|
|
|
target: /listmonk/config.toml
|
|
|
|
- source: app_entrypoint
|
|
|
|
target: /docker_entrypoint.sh
|
2022-09-29 12:36:29 +00:00
|
|
|
mode: 0555
|
2022-09-29 12:27:49 +00:00
|
|
|
entrypoint: /docker-entrypoint.sh
|
|
|
|
deploy:
|
|
|
|
update_config:
|
|
|
|
failure_action: rollback
|
|
|
|
order: start-first
|
|
|
|
labels:
|
|
|
|
- "traefik.enable=true"
|
|
|
|
- "traefik.http.routers.${STACK_NAME}.rule=Host(`${DOMAIN}`)"
|
|
|
|
- "traefik.http.routers.${STACK_NAME}.entrypoints=web-secure"
|
|
|
|
- "traefik.http.services.${STACK_NAME}.loadbalancer.server.port=9000"
|
|
|
|
- "traefik.http.routers.${STACK_NAME}.tls.certresolver=${LETS_ENCRYPT_ENV}"
|
|
|
|
|
|
|
|
db:
|
|
|
|
image: postgres:13
|
|
|
|
networks:
|
|
|
|
- internal
|
|
|
|
secrets:
|
|
|
|
- db_password
|
|
|
|
environment:
|
|
|
|
- POSTGRES_PASSWORD_FILE=/run/secrets/db_password
|
|
|
|
- POSTGRES_USER=listmonk
|
|
|
|
- POSTGRES_DB=listmonk
|
|
|
|
restart: unless-stopped
|
|
|
|
healthcheck:
|
|
|
|
test: ["CMD-SHELL", "pg_isready -U listmonk"]
|
|
|
|
interval: 10s
|
|
|
|
timeout: 5s
|
|
|
|
retries: 6
|
|
|
|
volumes:
|
|
|
|
- "postgres_data:/var/lib/postgresql/data"
|
|
|
|
|
|
|
|
secrets:
|
|
|
|
db_password:
|
|
|
|
name: ${STACK_NAME}_db_password_${SECRET_DB_PASSWORD_VERSION}
|
|
|
|
external: true
|
|
|
|
admin_password:
|
|
|
|
name: ${STACK_NAME}_admin_password_${SECRET_ADMIN_PASSWORD_VERSION}
|
|
|
|
external: true
|
|
|
|
|
2022-09-29 12:36:29 +00:00
|
|
|
configs:
|
|
|
|
config_toml:
|
|
|
|
name: ${STACK_NAME}_config_toml_${CONFIG_TOML_VERSION}
|
|
|
|
file: config.toml.tmpl
|
|
|
|
# template_driver: golang
|
|
|
|
app_entrypoint:
|
|
|
|
name: ${STACK_NAME}_app_entrypoint_${APP_ENTRYPOINT_VERSION}
|
|
|
|
file: docker-entrypoint.sh
|
|
|
|
# template_driver: golang
|
|
|
|
|
2022-09-29 12:27:49 +00:00
|
|
|
networks:
|
|
|
|
internal:
|
|
|
|
proxy:
|
|
|
|
external: true
|
|
|
|
|
|
|
|
volumes:
|
|
|
|
postgres_data:
|
|
|
|
|