sightbox/.env.example

92 lines
4.7 KiB
Plaintext

# Copy to .env — never commit the real file.
# Read by docker-compose.yml / docker-compose.data-dir.yml directly (not by
# any application code) — this is Compose's own variable substitution.
# Local dev only (Apple Silicon Macs): overrides the platform the Frappe
# images run as, so they don't run under x86_64 emulation. Leave unset on
# the real (x86_64) production host.
# FRAPPE_IMAGE_PLATFORM=linux/arm64
# Host port backend-billing's HTTP API is published on.
# BILLING_PUBLISH_PORT=8001
# Host port the BettersightBox marketing page (nginx, serving
# bettersightbox-index.html) is published on.
# MARKETING_PUBLISH_PORT=8091
# Production only — do NOT set this for local dev (see docker-compose.yml's
# own volumes: comment and playbook/BACKUP_RESTORE.md for why). Required
# when layering docker-compose.data-dir.yml on top of the base file:
# SIGHTBOX_DATA_DIR=/opt/sightbox/data
# Optional: points every Frappe-image service (backend, frontend, queue-*,
# scheduler, websocket, configurator — all share this via frappe_docker's
# own customizable_image anchor in compose.yaml) at a locally-built image
# instead of the stock frappe/erpnext one. Used for the ERPNext branding
# patch (erpnext-image/ — see erpnext-image/Dockerfile and build.sh) that
# removes "ERPNext" text/logo from spots Website Settings can't reach.
# Leave both unset to run the stock image untouched. If you do set them:
# frappe_docker's compose.yaml defaults this image to pull_policy: always
# (right for an image actually pushed to a registry) — a locally-built
# image via erpnext-image/build.sh was never pushed anywhere, so pulling
# it fails outright. Add PULL_POLICY=never below whenever CUSTOM_IMAGE is
# set to a local build; omit it (or leave unset) if you push this image to
# a real registry instead, e.g. for a multi-host production setup.
# CUSTOM_IMAGE=sightbox-erpnext
# CUSTOM_TAG=v16.34.1-branded
# PULL_POLICY=never
# backend-billing's own config — moved here from the now-retired
# backend/.env (plain environment: vars in docker-compose.yml's
# backend-billing service, not env_file:, specifically so Dokploy's
# AutoDeploy survives these across a redeploy — see that service's own
# comment for why env_file: didn't work).
# TENANTS_CONFIG_PATH=tenants.json
# SENTRY_DSN=
# ENVIRONMENT=production
# STATE_STORE_PATH=/data/state.db
# Resend notification for the marketing page's contact form
# (backend/billing/contact_lead.py) — unrelated to any tenant's own
# billing, this is the product's own lead-capture notification. Reuses
# the same Resend account already used for trial-expiry emails (see
# playbook/DEVELOPER_GUIDE.md). CONTACT_LEAD_NOTIFY_EMAIL is where the
# notification lands (your own inbox); CONTACT_LEAD_FROM_EMAIL defaults to
# Resend's no-verification-required sender, fine until a real domain is
# verified with Resend.
# RESEND_API_KEY=
# CONTACT_LEAD_NOTIFY_EMAIL=you@example.com
# CONTACT_LEAD_FROM_EMAIL=onboarding@resend.dev
# Host path for tenants.json itself (the bind-mount source, not its path
# inside the container — that's TENANTS_CONFIG_PATH above). Leave unset for
# local dev (defaults to ./backend/tenants.json, next to this repo
# checkout). Production MUST override this to an absolute path inside
# $SIGHTBOX_DATA_DIR — confirmed the hard way: Dokploy deletes and
# re-clones the whole git checkout on every AutoDeploy, so a file left at
# the default relative path never survives to the next deploy, and Docker
# silently creates an empty directory there instead of failing, which then
# crashes backend-billing with a confusing IsADirectoryError. Putting it in
# $SIGHTBOX_DATA_DIR instead means it survives every redeploy AND is
# already covered by backup.sh's nightly snapshot for free.
# TENANTS_JSON_PATH=/opt/sightbox/data/tenants.json
# backend-billing's image — same build-locally-push-to-registry pattern as
# CUSTOM_IMAGE above, see backend/build.sh. A bare name (no "/") like the
# default below means "local build only, nothing to push" — build.sh
# detects this and skips pushing/redeploying automatically. Set to a real
# registry path to build-push-redeploy for real.
# BACKEND_BILLING_IMAGE=sightbox-backend-billing
# BACKEND_BILLING_TAG=latest
# BACKEND_BILLING_PULL_POLICY=never
# Only needed if backend/build.sh should trigger the VPS redeploy itself
# after pushing — otherwise redeploy by hand in Dokploy's dashboard.
# DOKPLOY_URL is this Dokploy instance's own base URL (not the deployed
# app's domain). DOKPLOY_COMPOSE_ID is this Compose Application's id, not
# an "application" id — see backend/build.sh's own comment for why those
# are two different Dokploy API resource types.
# DOKPLOY_URL=https://dokploy.yourdomain.com
# DOKPLOY_API_TOKEN=
# DOKPLOY_COMPOSE_ID=