Add a committed .env.dev with dummy values for the dev stack
Starting the dev stack meant hand-building a .env, and the quick route of copying production's put real credentials on a dev machine: cookies were scoped to the live domain (so localhost login failed) and the mail, job-board and tunnel integrations ran against real accounts. .env.dev holds a dummy for every variable in .env.example, in whatever shape each service parses, with DOMAIN=localhost and the background jobs that touch real accounts switched off. It is copied over .env because several services read env_file: ./.env directly. OBSIDIAN_DIR points at a tracked dev/notes/ folder so the bind mount never gets created as root. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
@@ -0,0 +1,171 @@
|
||||
# =============================================================================
|
||||
# .env.dev — COMMITTED settings for the local dev stack. EVERY VALUE IS A DUMMY.
|
||||
#
|
||||
# Use it by copying it over the gitignored .env, then starting the dev stack:
|
||||
# cp .env.dev .env
|
||||
# docker compose -f docker-compose.yml -f docker-compose.dev.yml up --build
|
||||
# It has to BE .env, not be passed with --env-file: several services declare
|
||||
# `env_file: ./.env`, which compose reads regardless (see check-compose in the
|
||||
# Makefile).
|
||||
#
|
||||
# Nothing here is secret and nothing here may ever be used in production: the
|
||||
# passwords and signing keys only guard containers on your own machine, and
|
||||
# every third-party credential is fake, so those integrations fail at the
|
||||
# provider instead of reaching a real account. The background jobs that would
|
||||
# act on real accounts are switched off as well.
|
||||
#
|
||||
# Keep it in step with .env.example: a new variable goes in both. Settings that
|
||||
# are not secrets (hosts, ports, timezone) keep .env.example's defaults; values
|
||||
# a service parses (Garage's hex secrets, Gitea's base64 JWT keys, the S3 key
|
||||
# id) are dummies in the exact shape it requires, or that service won't start.
|
||||
#
|
||||
# The dummy Postgres credentials only work on a database volume created with
|
||||
# them: an existing dbdata volume keeps whatever password it was initialised
|
||||
# with. Only POSTGRES_DB is created on a fresh volume; the gitea, jobs and
|
||||
# tracker databases and roles still have to be created by hand (.env.example).
|
||||
# =============================================================================
|
||||
|
||||
# --- Postgres ----------------------------------------------------------------
|
||||
POSTGRES_USER=dev
|
||||
POSTGRES_PASSWORD=dev-postgres-password
|
||||
POSTGRES_DB=site
|
||||
POSTGRES_PORT=5432
|
||||
POSTGRES_HOST=db
|
||||
POSTGRES_JOBS_DB=jobs
|
||||
POSTGRES_JOBS_USER=jobs
|
||||
POSTGRES_JOBS_PASSWORD=dev-jobs-password
|
||||
POSTGRES_TRACKER_DB=tracker
|
||||
POSTGRES_TRACKER_USER=tracker
|
||||
POSTGRES_TRACKER_PASSWORD=dev-tracker-password
|
||||
|
||||
# --- Gitea -------------------------------------------------------------------
|
||||
# The two JWT secrets must decode as base64url of 32 bytes; these decode to
|
||||
# the text "dev-only-not-a-secret-0123456789".
|
||||
GITEA_HOST=gitea
|
||||
GITEA_PORT=3000
|
||||
GITEA_INTERNAL_TOKEN=dev-gitea-internal-token
|
||||
GITEA_LFS_JWT_SECRET=ZGV2LW9ubHktbm90LWEtc2VjcmV0LTAxMjM0NTY3ODk
|
||||
GITEA_OAUTH2_JWT_SECRET=ZGV2LW9ubHktbm90LWEtc2VjcmV0LTAxMjM0NTY3ODk
|
||||
POSTGRES_GITEA_DB=gitea
|
||||
# Blank means localhost.
|
||||
GITEA_SSH_DOMAIN=
|
||||
|
||||
# --- Gitea Actions runner ----------------------------------------------------
|
||||
# The runner is not part of the compose stack; nothing in dev reads these.
|
||||
GITEA_RUNNER_HOST=
|
||||
GITEA_RUNNER_NAME=dev-runner
|
||||
GITEA_RUNNER_REGISTRATION_TOKEN=dev-dummy-runner-token
|
||||
|
||||
# --- Email ingest (job tracker) -----------------------------------------------
|
||||
# Sync is off; the credentials are fake, so a manual sign-in fails at Microsoft.
|
||||
EMAIL_BACKEND=graph
|
||||
MSGRAPH_CLIENT_ID=00000000-0000-0000-0000-000000000000
|
||||
MSGRAPH_CLIENT_SECRET=dev-dummy-msgraph-secret
|
||||
MSGRAPH_TENANT_ID=consumers
|
||||
MSGRAPH_REDIRECT_URI=http://localhost/jobs/api/email/callback
|
||||
IMAP_HOST=imap.invalid
|
||||
IMAP_PORT=993
|
||||
IMAP_EMAIL=[email protected]
|
||||
IMAP_PASSWORD=dev-dummy-imap-password
|
||||
EMAIL_SYNC_INTERVAL=
|
||||
EMAIL_SYNC_ENABLED=false
|
||||
|
||||
# --- Job leads (job tracker) --------------------------------------------------
|
||||
# The timer is off; "Check now" still works for the keyless board sources.
|
||||
JOB_LEADS_ENABLED=false
|
||||
JOB_LEADS_INTERVAL=
|
||||
ADZUNA_APP_ID=dev-dummy-adzuna-id
|
||||
ADZUNA_APP_KEY=dev-dummy-adzuna-key
|
||||
REED_API_KEY=dev-dummy-reed-key
|
||||
|
||||
# --- SilverBullet (notes) ---------------------------------------------------
|
||||
SILVERBULLET_HOST=silverbullet
|
||||
SILVERBULLET_PORT=3000
|
||||
SILVERBULLET_PUBLIC_HOST=silverbullet-public
|
||||
SILVERBULLET_PUBLIC_PORT=3000
|
||||
SILVERBULLET_GIT_INTERVAL=300
|
||||
|
||||
# --- Go backend --------------------------------------------------------------
|
||||
# Must be at least 32 bytes or the backend refuses to start.
|
||||
BACKEND_PORT=8080
|
||||
BACKEND_HOST=backend
|
||||
BACKEND_SECRET=dev-only-jwt-signing-secret-not-for-production
|
||||
BACKEND_ENDPOINT=/api
|
||||
|
||||
# --- Obsidian vault ----------------------------------------------------------
|
||||
# A checked-in, mostly-gitignored folder, so the bind mount always has a
|
||||
# source owned by you; a missing path would be created by Docker as root and
|
||||
# SilverBullet (uid 1000) could not write to it. It is not a git repository,
|
||||
# so silverbullet-git logs that and idles instead of pushing anywhere.
|
||||
OBSIDIAN_DIR=./dev/notes
|
||||
|
||||
# --- Spotify -----------------------------------------------------------------
|
||||
# docker-compose.dev.yml overrides the redirect URI.
|
||||
SPOTIFY_CLIENT_ID=dev-dummy-spotify-client-id
|
||||
SPOTIFY_CLIENT_SECRET=dev-dummy-spotify-client-secret
|
||||
SPOTIFY_REDIRECT_URI=
|
||||
SPOTIFY_AUTH_STATE=dev-dummy-spotify-state
|
||||
|
||||
# --- Icecast / liquidsoap radio ----------------------------------------------
|
||||
ICECAST_SOURCE_PASSWORD=dev-icecast-source-password
|
||||
ICECAST_RELAY_PASSWORD=dev-icecast-relay-password
|
||||
ICECAST_ADMIN_USER=admin
|
||||
ICECAST_ADMIN_PASSWORD=dev-icecast-admin-password
|
||||
ICECAST_HOST=icecast2
|
||||
ICECAST_PORT=8000
|
||||
ICECAST_MOUNT=/stream
|
||||
LIQUIDSOAP_HARBOR_MOUNT=/live
|
||||
LIQUIDSOAP_HARBOR_PORT=8001
|
||||
|
||||
# --- TLS / identity ----------------------------------------------------------
|
||||
# DOMAIN is also the auth cookie's domain, so it must be the host the browser
|
||||
# is on. certbot is disabled in dev, so EMAIL is never used.
|
||||
DOMAIN=localhost
|
||||
EMAIL=[email protected]
|
||||
|
||||
# --- Cloudflare Tunnel -------------------------------------------------------
|
||||
# cloudflared is disabled in dev and certbot with it.
|
||||
CLOUDFLARE_TUNNEL_TOKEN=dev-dummy-tunnel-token
|
||||
CLOUDFLARE_DNS_API_TOKEN=dev-dummy-dns-token
|
||||
|
||||
# --- Third-party API keys ----------------------------------------------------
|
||||
# Fake keys: Claude calls (rowing photos, job posting reader) get a 401 from
|
||||
# Anthropic, and the Steam widget gets nothing back.
|
||||
CLAUDE_API_KEY=sk-ant-dev-dummy-key
|
||||
CLAUDE_MODEL=
|
||||
STEAM_API_KEY=DEVDUMMYSTEAMKEY
|
||||
STEAM_ID=76561190000000000
|
||||
|
||||
# --- Development-only switch -------------------------------------------------
|
||||
SEED_DB=true
|
||||
|
||||
# --- Python FastAPI service (/py/) -------------------------------------------
|
||||
PYTHON_HOST=python
|
||||
PYTHON_PORT=8000
|
||||
|
||||
# --- Job tracker (/jobs/) -----------------------------------------------------
|
||||
JOBS_IMAGE_TAG=
|
||||
|
||||
# --- USACO site (/usaco/) ------------------------------------------------------
|
||||
USACO_IMAGE_TAG=
|
||||
USACO_GIT_TOKEN=dev-dummy-gitea-token
|
||||
USACO_WEBHOOK_SECRET=dev-dummy-webhook-secret
|
||||
|
||||
# --- Activity tracker (/tracker/) --------------------------------------------
|
||||
ACTIVITY_TRACKER_IMAGE_TAG=
|
||||
TRACKER_TZ=Europe/London
|
||||
|
||||
TFL_APP_KEY=dev-dummy-tfl-key
|
||||
|
||||
# --- Garage object store (public /uploads/) -----------------------------------
|
||||
# Shapes Garage enforces: 64 hex for the RPC secret, "GK" + 24 hex for the key
|
||||
# id, 64 hex for the secret. Uploads fall back to the `uploads` volume until
|
||||
# garage/bootstrap.sh has imported this key and created the bucket.
|
||||
GARAGE_RPC_SECRET=0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef
|
||||
GARAGE_ADMIN_TOKEN=dev-garage-admin-token
|
||||
S3_ACCESS_KEY_ID=GK0123456789abcdef01234567
|
||||
S3_SECRET_ACCESS_KEY=fedcba9876543210fedcba9876543210fedcba9876543210fedcba9876543210
|
||||
S3_ENDPOINT=http://garage:3900
|
||||
S3_REGION=garage
|
||||
S3_BUCKET=uploads
|
||||
GARAGE_CAPACITY=1G
|
||||
Reference in New Issue
Block a user