# ------------------------------------------------------------------
# Ghost stack: Insights (insights.mildgrim.com)
# Professional / long-form writing.
# ActivityPub enabled. Newsletter + memberships day one via the SMTP
# transport below (Stalwart); Stripe can be added later without infra
# changes (it is Ghost-admin configuration, not a container concern).
#
# .env is the single source of truth for Compose interpolation and is
# committed so Portainer (Git + relative path volumes) auto-loads it.
# Real values (secrets are committed here, like the other stacks). The duplicate
# ghost-insights/stack.env was removed on 2026-10-15 — see the database block.
# ------------------------------------------------------------------

# Ghost image version. Previously unset, which meant the compose default
# "6-alpine" floated silently across all three sites — no way to tell what was
# actually running. Bump this and redeploy to upgrade.
# TODO before production: add a digest (docker buildx imagetools inspect ghost:6.70.0-alpine).
GHOST_VERSION=6.70.0-alpine

# Enable optional containers. ActivityPub is self-hosted here.
# Native analytics is intentionally NOT enabled — Umami is used instead.
COMPOSE_PROFILES=activitypub

# Public domain Ghost will run on.
DOMAIN=insights.mildgrim.com

# Host port published for this stack's Caddy (HTTP). The VPS Caddy edge
# terminates TLS and reverse-proxies insights.mildgrim.com here over WireGuard.
HTTP_PORT=10030

# Self-host the ActivityPub service instead of the Ghost(Pro) hosted one.
ACTIVITYPUB_TARGET=activitypub:8080

# Database settings.
# WARNING: do not change these after the database has been initialised.
# Generate strong values with: openssl rand -hex 32
#
# 2026-10-15: filled from the old ghost-insights/stack.env, which is now deleted.
# stack.env is a reserved Portainer placeholder name (docs/ghost.md), and keeping
# both files meant it was ambiguous which source a deploy would actually resolve —
# so a version bump written here could have silently done nothing.
DATABASE_ROOT_PASSWORD=250a410a3a50ae3025d484f7347a38a02f7b54f2c3f5bd898c693a0ea63e8a11
DATABASE_USER=ghost
DATABASE_PASSWORD=500ca038afad221de60ffa96dc88205cc199db3d1e4ed80fd403e9bf97c5f03d

# ------------------------------------------------------------------
# SMTP (Stalwart on the VPS).
# Serves both transactional mail and newsletter (bulk) mail.
# Watch Stalwart sending limits when newsletters go out.
# ------------------------------------------------------------------
mail__transport=SMTP
mail__options__host=smtp.mildgrim.com
mail__options__port=465
mail__options__secure=true
mail__options__auth__user=newsletter@mildgrim.com
mail__options__auth__pass=e34ac8a3cb11106f0f5695a40969933be8718a14ddb0e1ea249307261b07cdfe
mail__from="'Mildgrim Insights' <newsletter@mildgrim.com>"

# ------------------------------------------------------------------
# Data locations. ABSOLUTE host paths so they survive Portainer repo
# re-clones (a relative ./data would be wiped on every redeploy).
# ------------------------------------------------------------------
UPLOAD_LOCATION=/home/mildgrim/ghost-insights/data/ghost
MYSQL_DATA_LOCATION=/home/mildgrim/ghost-insights/data/mysql
