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:
parent
d5a5875899
commit
2060606adc
3 changed files with 8 additions and 11 deletions
|
|
@ -16,5 +16,8 @@ CADDY_API_URL=http://localhost:2019
|
||||||
# Use "localhost" for local dev, your real domain on the Pi.
|
# Use "localhost" for local dev, your real domain on the Pi.
|
||||||
DOMAIN_SUFFIX=localhost
|
DOMAIN_SUFFIX=localhost
|
||||||
|
|
||||||
|
# Email for Let's Encrypt registration (production only; ignored for localhost).
|
||||||
|
ACME_EMAIL=you@yourdomain.com
|
||||||
|
|
||||||
# Rust log filter.
|
# Rust log filter.
|
||||||
RUST_LOG=hiy_server=debug,tower_http=info
|
RUST_LOG=hiy_server=debug,tower_http=info
|
||||||
|
|
|
||||||
|
|
@ -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
|
|
||||||
|
|
@ -2,11 +2,12 @@
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
||||||
|
REPO_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
|
||||||
cd "$SCRIPT_DIR"
|
cd "$SCRIPT_DIR"
|
||||||
|
|
||||||
# ── Load .env ──────────────────────────────────────────────────────────────────
|
# ── Load .env from repo root ───────────────────────────────────────────────────
|
||||||
if [ -f .env ]; then
|
if [ -f "$REPO_ROOT/.env" ]; then
|
||||||
set -a; source .env; set +a
|
set -a; source "$REPO_ROOT/.env"; set +a
|
||||||
fi
|
fi
|
||||||
|
|
||||||
DOMAIN_SUFFIX="${DOMAIN_SUFFIX:-}"
|
DOMAIN_SUFFIX="${DOMAIN_SUFFIX:-}"
|
||||||
|
|
@ -62,4 +63,4 @@ echo "[hiy] Generated proxy/caddy.json for ${DOMAIN_SUFFIX}"
|
||||||
make build
|
make build
|
||||||
|
|
||||||
# ── Start services (detached) ──────────────────────────────────────────────────
|
# ── Start services (detached) ──────────────────────────────────────────────────
|
||||||
docker compose up -d
|
docker compose --env-file "$REPO_ROOT/.env" up -d
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue