services: << service_name >>: image: listmonk/listmonk:latest container_name: << service_name >> environment: - TZ=<< timezone >> - LISTMONK_app__address=0.0.0.0:9000 - LISTMONK_db__host=<< service_name >>-db - LISTMONK_db__port=5432 - LISTMONK_db__user=listmonk - LISTMONK_db__password=<< db_password >> - LISTMONK_db__database=listmonk - LISTMONK_db__ssl_mode=disable - LISTMONK_app__admin_username=<< admin_user >> - LISTMONK_app__admin_password=<< admin_password >> volumes: - << appdata_dir >>/<< service_name >>:/listmonk/uploads command: sh -c "./listmonk --install --idempotent --yes --config '' && ./listmonk --config ''" ports: - "<< port >>:9000" depends_on: - << service_name >>-db restart: unless-stopped << service_name >>-db: image: postgres:16-alpine container_name: << service_name >>-db environment: - POSTGRES_DB=listmonk - POSTGRES_USER=listmonk - POSTGRES_PASSWORD=<< db_password >> volumes: - << appdata_dir >>/<< service_name >>-db:/var/lib/postgresql/data restart: unless-stopped