Consolidate to single .env at repo root

Add ACME_EMAIL to root .env.example.
start.sh now reads root .env and passes it to docker compose.
Removed infra/.env.example.
This commit is contained in:
Claude 2026-03-20 10:21:35 +00:00
parent d5a5875899
commit 2060606adc
No known key found for this signature in database
3 changed files with 8 additions and 11 deletions

View file

@ -16,5 +16,8 @@ CADDY_API_URL=http://localhost:2019
# Use "localhost" for local dev, your real domain on the Pi.
DOMAIN_SUFFIX=localhost
# Email for Let's Encrypt registration (production only; ignored for localhost).
ACME_EMAIL=you@yourdomain.com
# Rust log filter.
RUST_LOG=hiy_server=debug,tower_http=info

View file

@ -1,7 +0,0 @@
# Copy to infra/.env and fill in before running ./start.sh
# Your domain — subdomains will be: <appname>.yourdomain.com
DOMAIN_SUFFIX=yourdomain.com
# Email for Let's Encrypt registration (not public, just for cert renewal notices).
ACME_EMAIL=you@yourdomain.com

View file

@ -2,11 +2,12 @@
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
REPO_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
cd "$SCRIPT_DIR"
# ── Load .env ──────────────────────────────────────────────────────────────────
if [ -f .env ]; then
set -a; source .env; set +a
# ── Load .env from repo root ───────────────────────────────────────────────────
if [ -f "$REPO_ROOT/.env" ]; then
set -a; source "$REPO_ROOT/.env"; set +a
fi
DOMAIN_SUFFIX="${DOMAIN_SUFFIX:-}"
@ -62,4 +63,4 @@ echo "[hiy] Generated proxy/caddy.json for ${DOMAIN_SUFFIX}"
make build
# ── Start services (detached) ──────────────────────────────────────────────────
docker compose up -d
docker compose --env-file "$REPO_ROOT/.env" up -d