Files
letter/docker-compose.yml
nmemmertandClaude Sonnet 4.6 fc3bae40da Update compose + CI for CasaOS deploy; build both images in CI
docker-compose.yml:
- Remove env_file — all vars inline with \${VAR:-default} substitution
- NTFY_TOPIC soft-defaults to empty (no hard :? error)
- Pull pre-built images from ghcr.io (no local build step)
- Add resource limits: app 512MB/1CPU, notifier 128MB/0.25CPU
- Add x-casaos metadata for CasaOS app store / dashboard
- Remove dev service (run separately as needed)

.github/workflows/docker.yml:
- Build and push both app (ghcr.io/nmemmert/letter) and notifier
  (ghcr.io/nmemmert/letter-notifier) images in one job
- Separate GHA cache scopes per image for efficient layer reuse
- Separate metadata steps for independent tag sets

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-08-17 13:26:54 -04:00

50 lines
1.1 KiB
YAML

services:
app:
image: "ghcr.io/nmemmert/letter:main"
deploy:
resources:
reservations:
memory: 128MB
cpus: "0.00"
limits:
memory: 512MB
cpus: "1.00"
restart: no
network_mode: bridge
ports:
- "${APP_PORT:-8080}:80"
volumes: []
notifier:
image: "ghcr.io/nmemmert/letter-notifier:main"
deploy:
resources:
reservations:
memory: 64MB
cpus: "0.00"
limits:
memory: 128MB
cpus: "0.25"
restart: no
network_mode: bridge
volumes: []
environment:
- NTFY_TOPIC=${NTFY_TOPIC:-}
- NTFY_URL=${NTFY_URL:-https://ntfy.sh}
- NTFY_TOKEN=${NTFY_TOKEN:-}
- NTFY_PRIORITY=${NTFY_PRIORITY:-default}
- CRON_SCHEDULE=${CRON_SCHEDULE:-0 9 1 * *}
- TZ=${TZ:-America/Chicago}
- APP_URL=${APP_URL:-http://172.16.16.106:8080}
- NTFY_TEST_ON_START=${NTFY_TEST_ON_START:-false}
depends_on:
- app
x-casaos:
title:
custom: "Annual Letter"
main: app
scheme: http
hostname: "172.16.16.106"
index: /