Files
gitea-heatmap-sidecar/docker-compose.example.yml
T
didericis 8ec8df3827 Pull DATABASE_URL from host env in docker-compose.example.yml
Avoids writing credentials to disk. The bare key form passes the value
through from the host environment at compose-up time.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-05 16:02:50 -04:00

37 lines
1.3 KiB
YAML

# Example: drop into the same Docker network as your existing Gitea stack.
# Adjust GITEA_DB_HOST, network name, and the reverse-proxy section to match
# your TrueNAS setup.
services:
heatmap:
build: .
image: gitea-heatmap-sidecar:local
container_name: gitea-heatmap
restart: unless-stopped
environment:
# Read-only Postgres user (see db/setup.sql).
# Pass DATABASE_URL from the host environment — never write credentials to disk.
# e.g. export DATABASE_URL=postgres://heatmap_ro:...@gitea-db:5432/gitea?sslmode=disable
DATABASE_URL:
# Comma-separated lowercase usernames whose heatmap may be served.
ALLOWED_USERS: "didericis"
# CORS: must match the origin Gitea is served from.
ALLOWED_ORIGIN: "https://gitea.dideric.is"
# Optional: which Gitea action.op_type values count as a "contribution".
# Default 5,9,18 = commit push, tag push, mirror sync push.
# OP_TYPES: "5,9,11,18,24"
LISTEN: ":8080"
networks:
- gitea
healthcheck:
test: ["CMD", "/heatmap", "-healthcheck"]
interval: 30s
timeout: 5s
retries: 3
start_period: 10s
networks:
gitea:
# external: true # uncomment if your Gitea network already exists
name: gitea-net