# shithub environment example. Copy to .env and edit. .env is gitignored. # # Variables follow SHITHUB__ naming so they don't collide with # system env. Nested config keys are joined with double-underscore in env # (e.g. database.url -> SHITHUB_DATABASE__URL). # ----- web ----- SHITHUB_WEB_ADDR=:8080 # ----- database (S01) ----- # Used by `shithubd web`, `shithubd worker`, `shithubd migrate`, etc. SHITHUB_DATABASE_URL=postgres://shithub:shithub_dev@127.0.0.1:5432/shithub?sslmode=disable # Used only by tests. The dbtest harness creates per-test DBs cloned from a # template DB rooted under this server. SHITHUB_TEST_DATABASE_URL=postgres://shithub:shithub_dev@127.0.0.1:5432/postgres?sslmode=disable # ----- storage (S04) ----- # Filesystem root for bare git repos. Production: /data/repos on the # block-storage volume. Dev default below points at a per-user dir. SHITHUB_STORAGE__REPOS_ROOT=/tmp/shithub-dev/repos # S3-compatible object storage. Dev defaults target the local MinIO from # docker-compose. Set non-default credentials in .env (do NOT commit). SHITHUB_STORAGE__S3__ENDPOINT=127.0.0.1:9000 SHITHUB_STORAGE__S3__REGION=us-east-1 SHITHUB_STORAGE__S3__ACCESS_KEY_ID=shithub-dev SHITHUB_STORAGE__S3__SECRET_ACCESS_KEY=shithub-dev-secret-please-change SHITHUB_STORAGE__S3__BUCKET=shithub-dev SHITHUB_STORAGE__S3__USE_SSL=false SHITHUB_STORAGE__S3__FORCE_PATH_STYLE=true # ----- auth (S05) ----- # Set false in dev for fast iteration; keep true in prod. SHITHUB_AUTH__REQUIRE_EMAIL_VERIFICATION=false # Used for the link in transactional emails โ€” set to your public origin in prod. SHITHUB_AUTH__BASE_URL=http://127.0.0.1:8080 SHITHUB_AUTH__SITE_NAME=shithub SHITHUB_AUTH__EMAIL_FROM=shithub # stdout (default in dev), smtp (MailHog), postmark, or resend. SHITHUB_AUTH__EMAIL_BACKEND=stdout # When email_backend=smtp: SHITHUB_AUTH__SMTP__ADDR=127.0.0.1:1025 # When email_backend=postmark: # SHITHUB_AUTH__POSTMARK__SERVER_TOKEN=... # When email_backend=resend (https://resend.com โ€” no approval queue): # SHITHUB_AUTH__RESEND__API_KEY=re_... # AEAD key for at-rest TOTP secrets (S06). Generate once and persist โ€” # rotating without re-encrypting every row breaks every existing 2FA login. # SHITHUB_TOTP_KEY=$(openssl rand -base64 32) # ----- rate limits (S50 ยง0) ----- # Per-hour budgets for /api/v1/* requests. Authed keyed by token id; # anon keyed by remote IP. Zero falls back to the default. SHITHUB_RATELIMIT__API__AUTHED_PER_HOUR=5000 SHITHUB_RATELIMIT__API__ANON_PER_HOUR=60 # ----- billing (SP03) ----- # Stripe Billing is disabled by default. Use Stripe test-mode keys for local # drills and keep live keys in the production EnvironmentFile only. SHITHUB_BILLING__ENABLED=false SHITHUB_BILLING__GRACE_PERIOD=336h # Required when billing is enabled: # SHITHUB_BILLING__STRIPE__SECRET_KEY=sk_test_... # SHITHUB_BILLING__STRIPE__WEBHOOK_SECRET=whsec_... # SHITHUB_BILLING__STRIPE__TEAM_PRICE_ID=price_... # Optional absolute override URLs; omitted values are derived from # SHITHUB_AUTH__BASE_URL. # SHITHUB_BILLING__STRIPE__SUCCESS_URL=https://shithub.example/organizations/{org}/billing/success # SHITHUB_BILLING__STRIPE__CANCEL_URL=https://shithub.example/organizations/{org}/billing/cancel # SHITHUB_BILLING__STRIPE__PORTAL_RETURN_URL=https://shithub.example/organizations/{org}/settings/billing SHITHUB_BILLING__STRIPE__AUTOMATIC_TAX=false