version: '3.9' services: listmonk-db: container_name: {{ customer }}-listmonk-db image: postgres:13 restart: always volumes: - {{ customer }}-listmonk-postgresql:/var/lib/postgresql/data - {{ customer }}-listmonk-backups:/tmp/backups ports: - "127.0.0.1:3037:5432" environment: POSTGRES_DB: listmonk POSTGRES_USER: {{ listmonk_db_user }} POSTGRES_PASSWORD: {{ listmonk_db_password }} healthcheck: test: ["CMD-SHELL", "pg_isready -U {{ listmonk_db_user }} -d listmonk"] interval: 10s timeout: 5s retries: 6 networks: {{ customer }}-listmonk: ipv4_address: 172.20.6.2 listmonk-web: container_name: {{ customer }}-listmonk-web image: listmonk/listmonk:latest restart: always labels: - "diun.enable=true" command: [sh, -c, "yes | ./listmonk --install --config config.toml && ./listmonk --config config.toml"] volumes: - ./config.toml:/listmonk/config.toml - {{ customer }}-listmonk-backups:/tmp/backups ports: - "127.0.0.1:3006:9000" depends_on: - listmonk-db environment: TZ: Etc/UTC networks: {{ customer }}-listmonk: ipv4_address: 172.20.6.3 networks: {{ customer }}-listmonk: ipam: driver: default config: - subnet: 172.20.6.0/28 gateway: 172.20.6.1 volumes: {{ customer }}-listmonk-postgresql: {{ customer }}-listmonk-backups: