who_need_help/.env.example

208 lines
9.3 KiB
Plaintext

# Copy this file to .env. Compose intentionally refuses to start without the
# required values. Replace every credential before any public deployment.
# Deployment selection is consumed by scripts/deploy-up.sh and
# scripts/compose.sh; the application does not try to start an orchestrator.
DEPLOYMENT_TARGET=compose
DEPLOYMENT_ENV=development
COMPOSE_PROJECT_NAME=who_need_help
# Every independently deployable checkout must use its own image tags. This
# prevents a test build from replacing the image used by production.
APP_IMAGE=who-need-help:local
SOCKET_PROXY_IMAGE=who-need-help:socket-proxy-local
POSTGIS_IMAGE=who-need-help:postgis-local
# split runs independently scalable web and worker replicas behind Traefik.
# compact runs one combined Phoenix + Oban VM directly on HTTP_PORT.
APP_TOPOLOGY=split
# container starts the project-owned PostGIS service. external excludes that
# service completely and connects every application role through DATABASE_URL.
DATABASE_MODE=container
# Only used when DEPLOYMENT_TARGET=kubernetes.
KUBERNETES_MODE=kind
KUBE_CONTEXT=
KUBE_NAMESPACE=who-need-help
KUBE_RELEASE=who-need-help
KUBE_VALUES_FILE=
HTTP_PORT=4010
# Bind the public Compose proxy to loopback when a reverse proxy runs on the
# same host. The current VPN staging path needs an address reachable by its
# verified tunnel topology, so choose this per deployment.
HTTP_BIND_ADDRESS=0.0.0.0
# Attach the selected app service to the separately managed public Caddy
# network. Keep disabled for ordinary local development.
PUBLIC_EDGE_ENABLED=false
PUBLIC_EDGE_NETWORK=who_need_help_public_edge
PUBLIC_UPSTREAM_NAME=who-need-help-local
# The public Caddy edge is managed from the production checkout with the same
# production .env. The test checkout joins PUBLIC_EDGE_NETWORK but never owns
# or restarts Caddy.
EDGE_COMPOSE_PROJECT_NAME=who_need_help_edge
CADDY_IMAGE=who-need-help:caddy-local
EDGE_BIND_ADDRESS=0.0.0.0
EDGE_HTTP_PORT=80
EDGE_HTTPS_PORT=443
PRIMARY_DOMAIN=whoneedhelp.com
PRIMARY_UPSTREAM=who-need-help-production:4000
TEST_DOMAIN=test.whoneedhelp.com
TEST_UPSTREAM=who-need-help-test:4000
MAILPIT_PORT=8027
MAILPIT_BIND_ADDRESS=127.0.0.1
DOCKER_SOCKET_GID=REPLACE_WITH_DOCKER_SOCKET_NUMERIC_GID
# Comma-separated proxy IP/CIDR values whose X-Forwarded-* headers Traefik
# accepts. Keep loopback locally; set the exact VPN proxy address for staging.
TRAEFIK_TRUSTED_IPS=127.0.0.1/32
TRAEFIK_RETRY_ATTEMPTS=3
# Keep false for ordinary deployments. The isolated load profile enables the
# unbound port-8080 API only inside its private Compose networks so its rolling
# drill can observe when a drained backend leaves service.
TRAEFIK_API_INSECURE=false
# Docker-provider isolation and names. A second Compose project must use its
# own project constraint, router/service name, Docker network, and Host rule.
TRAEFIK_PROJECT_CONSTRAINT=who_need_help
TRAEFIK_APP_NAME=who-need-help
TRAEFIK_DOCKER_NETWORK=who_need_help_ingress
TRAEFIK_ROUTER_RULE='PathPrefix(`/`)'
PHX_HOST=localhost
PHX_SCHEME=http
PHX_URL_PORT=4010
# Optional comma-separated additional browser origins for Phoenix sockets.
# Keep this empty when the site is reached only through PHX_HOST. For a local
# Compose instance also exposed through an HTTPS tunnel, list both exact
# origins, for example: https://dev.example.com,http://localhost:4010
PHX_CHECK_ORIGINS=
# Android debug builds compile this origin into BuildConfig. The Docker
# emulator uses adb reverse to expose the local Compose proxy on loopback.
WNH_DEBUG_BASE_URL=http://localhost:4010
# Staging/release builds require a public HTTPS origin. Keep the value
# environment-specific; scripts/ensure-local-public-origin.sh can derive it
# from the three PHX_* values in the ignored .env.
WNH_BASE_URL=
# These local values preserve the existing five-second client freshness window
# and fifteen-second request timeout. They are build inputs, not measured
# production capacity recommendations.
WNH_TRACKING_MIN_TIME_MS=5000
WNH_TRACKING_HTTP_TIMEOUT_MS=15000
WNH_ANDROID_VERSION_CODE=1
WNH_ANDROID_VERSION_NAME=0.1.0
# Public Firebase Android client configuration. These values are embedded in
# the APK and are not service-account credentials. Set all four per environment
# to enable native FCM registration, or leave all four empty to disable it.
WNH_FIREBASE_APPLICATION_ID=
WNH_FIREBASE_API_KEY=
WNH_FIREBASE_PROJECT_ID=
WNH_FIREBASE_GCM_SENDER_ID=
# Verified Android App Links are configured by the web deployment rather than
# embedded as secrets in the application. Use org.whoneedhelp.mobile.staging
# with the staging signing certificate on the dev checkout and
# org.whoneedhelp.mobile with every active Play signing certificate on
# production. Keep both empty until the matching signed APK/AAB is available.
ANDROID_APP_LINKS_PACKAGE_NAME=
ANDROID_APP_LINKS_SHA256_CERT_FINGERPRINTS=
# Public identifier of the locally held Google Play upload key. The private
# keystore and its randomized password live outside the repository under
# ~/.config/who_need_help/android-release/.
WNH_ANDROID_SIGNING_KEY_ALIAS=who-need-help-upload
# The dev-domain staging APK uses a different stable signing identity under
# ~/.config/who_need_help/android-staging/. This keeps App Link verification
# reproducible without reusing the future production upload key.
WNH_ANDROID_STAGING_SIGNING_KEY_ALIAS=who-need-help-staging
WNH_ANDROID_TEST_API_MATRIX="24 30 34 37.0"
WNH_ANDROID_TEST_DATA_PARTITION_SIZE=1G
# Public raster tile template used by MapLibre. Use a provider whose policy and
# capacity match the deployment before a public launch.
MAP_TILE_URL=https://tile.openstreetmap.org/{z}/{x}/{y}.png
# Optional verified GitHub linking. Leave both empty until a GitHub OAuth App
# exists. Its callback URL must be:
# https://YOUR_PHX_HOST/auth/social/github/callback
GITHUB_OAUTH_CLIENT_ID=
GITHUB_OAUTH_CLIENT_SECRET=
# Optional endpoint and timeout overrides exist for the isolated boundary drill.
# Leave them empty for GitHub's official endpoints and Req's library timeouts.
GITHUB_OAUTH_BASE_URL=
GITHUB_OAUTH_AUTHORIZE_URL=
GITHUB_OAUTH_TOKEN_URL=
GITHUB_OAUTH_USER_URL=
GITHUB_OAUTH_HTTP_CONNECT_TIMEOUT_MS=
GITHUB_OAUTH_HTTP_RECEIVE_TIMEOUT_MS=
# Optional Google OpenID Connect registration and sign-in. Leave both empty
# until a Google OAuth Web client exists. Its callback URL must be:
# https://YOUR_PHX_HOST/auth/google/callback
GOOGLE_OAUTH_CLIENT_ID=
GOOGLE_OAUTH_CLIENT_SECRET=
# Leave endpoint and timeout overrides empty for Google's discovery endpoint
# and Req defaults. The base URL override exists for isolated protocol tests.
GOOGLE_OAUTH_BASE_URL=
GOOGLE_OAUTH_HTTP_CONNECT_TIMEOUT_MS=
GOOGLE_OAUTH_HTTP_RECEIVE_TIMEOUT_MS=
# Optional provider-neutral HTTP push boundary. Leave both endpoint and token
# empty to disable product push jobs. When enabled, all four numeric values are
# required deployment inputs; the project does not claim universal production
# values for them.
PUSH_HTTP_ENDPOINT=
PUSH_HTTP_BEARER_TOKEN=
PUSH_HTTP_MAX_ATTEMPTS=
PUSH_HTTP_RECEIVE_TIMEOUT_MS=
PUSH_HTTP_CONNECT_TIMEOUT_MS=
PUSH_HTTP_RETRY_DELAY_MS=
# Direct browser Web Push. Generate one VAPID key pair per environment and
# keep the private key only in that environment's .env. The subject must be a
# mailto: or HTTPS contact owned by the operator.
WEB_PUSH_VAPID_PUBLIC_KEY=
WEB_PUSH_VAPID_PRIVATE_KEY=
WEB_PUSH_VAPID_SUBJECT=
# Native Android push through Firebase Cloud Messaging. Either mount the
# service-account JSON read-only and set its absolute in-container path, or put
# standard Base64 of that JSON in the single environment file. Never set both.
# Leave all three values empty to disable FCM.
FCM_PROJECT_ID=
FCM_SERVICE_ACCOUNT_FILE=
FCM_SERVICE_ACCOUNT_JSON_BASE64=
POSTGRES_DB=who_need_help
POSTGRES_USER=postgres
POSTGRES_PASSWORD=replace-with-a-local-or-deployment-secret
DATABASE_URL=ecto://postgres:replace-with-url-encoded-password@db/who_need_help
# Optional absolute host directory containing PostgreSQL Unix sockets. When it
# is set in external mode, Compose mounts it read-only and Ecto uses it instead
# of the hostname in DATABASE_URL. Leave empty for container or remote TCP DBs.
DATABASE_SOCKET_DIR=
WEB_POOL_SIZE=4
WORKER_POOL_SIZE=2
MIGRATE_POOL_SIZE=2
COMBINED_POOL_SIZE=4
OBAN_MAINTENANCE_CONCURRENCY=2
OBAN_PUSH_CONCURRENCY=1
WEB_REPLICAS=2
WORKER_REPLICAS=2
# Maximum simultaneously existing Erlang ports (files, sockets and drivers).
# Keeping this explicit prevents a host's very large nofile ulimit from making
# every BEAM instance preallocate a multi-gigabyte port table.
ERLANG_PORT_LIMIT=65536
SECRET_KEY_BASE=generate-with-mix-phx-gen-secret
HANDOVER_SECRET=generate-an-independent-random-secret
RELEASE_COOKIE=generate-an-independent-beam-cluster-cookie
METRICS_TOKEN=generate-an-independent-random-bearer-token
# Use Mailpit locally or a transactional SMTP relay in public environments.
EMAIL_DELIVERY_PROVIDER=smtp
SMTP_RELAY=mailpit
SMTP_PORT=1025
SMTP_USERNAME=
SMTP_PASSWORD=
SMTP_AUTH=never
SMTP_TLS=never
SMTP_SSL=false
EMAIL_FROM_NAME="Who Need Help"
EMAIL_FROM_ADDRESS=contact@example.com
# Optional monitored inbox. It receives new-case alerts and is used as Reply-To.
SUPPORT_INBOX_ADDRESS=
CODEX_SESSION_ID=copy-the-main-local-codex-session-id
# Optional shared PostgreSQL-backed policies. Keep {} until product thresholds are approved.
# Shape: {"action_name":{"limit":POSITIVE_INTEGER,"window_seconds":POSITIVE_INTEGER}}
RATE_LIMIT_POLICIES_JSON={}