blob: 5a3d16a4cb4057ad4bd91d25cf36a559ed3ce743 [file] [log] [blame]
# Example Compose file you can use to run the ZenithPlanner system.
# This is a modified copy of the Compose template I use to run this system in my
# homelab.
# You may want to modify it in order to meet your production security standards.
services:
db:
image: docker.io/postgres:17
container_name: zenithplanner_db
restart: unless-stopped
networks:
- internal
# Connect the DB to a network shared with the Grafana container so Grafana
# is able to connect to the DB.
- grafana
volumes:
- "db:/var/lib/postgresql/data"
environment:
# NOTE: Change this password
- "POSTGRES_PASSWORD=changemeplz"
- "POSTGRES_USER=zenithplanner"
- "POSTGRES_DB=zenithplanner"
- "PGDATA=/var/lib/postgresql/data/pgdata"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U zenithplanner -d zenithplanner"]
interval: 10s
timeout: 5s
retries: 5
app:
image: ghcr.io/avm99963/zenith-planner:latest
container_name: zenithplanner_app
restart: unless-stopped
depends_on:
db:
condition: service_healthy
restart: true
networks:
- web
- internal
# NOTE: Create a .env file with the contents of .env.example.
env_file: .env
# I use Traefik as a reverse proxy. In general, you want to expose port 8080
# to your reverse proxy and configure it appropiately.
labels:
traefik.enable: "true"
traefik.http.routers.zenithplanner.rule: "Host(`zenith-planner.example.com`)"
traefik.http.routers.zenithplanner.service: "zenithplanner"
traefik.http.routers.zenithplanner.tls: ""
traefik.http.services.zenithplanner.loadbalancer.server.port: "8080"
traefik.http.routers.zenithplanner.middlewares: 'hsts@file'
networks:
# Network shared with Traefik.
web:
external: true
# Network shared with the Grafana container.
grafana:
external: true
internal:
volumes:
db: