version: "3.7" x-application-defaults: &application-defaults restart: unless-stopped image: listmonk/listmonk:latest ports: - "127.0.0.1:{{http_port}}:9000" networks: - listmonk environment: - TZ=Etc/UTC x-database-defaults: &database-defaults image: postgres:alpine ports: - "9432:5432" networks: - listmonk environment: - POSTGRES_PASSWORD={{listmonk_database_password}} - POSTGRES_USER=listmonk - POSTGRES_DB=listmonk restart: unless-stopped healthcheck: test: ["CMD-SHELL", "pg_isready -U listmonk"] interval: 10s timeout: 5s retries: 6 services: database: <<: *database-defaults container_name: database volumes: - type: volume source: listmonk-data target: /var/lib/postgresql/data application: <<: *application-defaults container_name: listmonk_application depends_on: - database volumes: - ./config.toml:/listmonk/config.toml networks: listmonk: volumes: listmonk-data: