Bash · 2177 bytes Raw Blame History
1 # shithub environment example. Copy to .env and edit. .env is gitignored.
2 #
3 # Variables follow SHITHUB_<area>_<key> naming so they don't collide with
4 # system env. Nested config keys are joined with double-underscore in env
5 # (e.g. database.url -> SHITHUB_DATABASE__URL).
6
7 # ----- web -----
8 SHITHUB_WEB_ADDR=:8080
9
10 # ----- database (S01) -----
11 # Used by `shithubd web`, `shithubd worker`, `shithubd migrate`, etc.
12 SHITHUB_DATABASE_URL=postgres://shithub:shithub_dev@127.0.0.1:5432/shithub?sslmode=disable
13
14 # Used only by tests. The dbtest harness creates per-test DBs cloned from a
15 # template DB rooted under this server.
16 SHITHUB_TEST_DATABASE_URL=postgres://shithub:shithub_dev@127.0.0.1:5432/postgres?sslmode=disable
17
18 # ----- storage (S04) -----
19 # Filesystem root for bare git repos. Production: /data/repos on the
20 # block-storage volume. Dev default below points at a per-user dir.
21 SHITHUB_STORAGE__REPOS_ROOT=/tmp/shithub-dev/repos
22
23 # S3-compatible object storage. Dev defaults target the local MinIO from
24 # docker-compose. Set non-default credentials in .env (do NOT commit).
25 SHITHUB_STORAGE__S3__ENDPOINT=127.0.0.1:9000
26 SHITHUB_STORAGE__S3__REGION=us-east-1
27 SHITHUB_STORAGE__S3__ACCESS_KEY_ID=shithub-dev
28 SHITHUB_STORAGE__S3__SECRET_ACCESS_KEY=shithub-dev-secret-please-change
29 SHITHUB_STORAGE__S3__BUCKET=shithub-dev
30 SHITHUB_STORAGE__S3__USE_SSL=false
31 SHITHUB_STORAGE__S3__FORCE_PATH_STYLE=true
32
33 # ----- auth (S05) -----
34 # Set false in dev for fast iteration; keep true in prod.
35 SHITHUB_AUTH__REQUIRE_EMAIL_VERIFICATION=false
36 # Used for the link in transactional emails — set to your public origin in prod.
37 SHITHUB_AUTH__BASE_URL=http://127.0.0.1:8080
38 SHITHUB_AUTH__SITE_NAME=shithub
39 SHITHUB_AUTH__EMAIL_FROM=shithub <noreply@shithub.local>
40 # stdout (default in dev), smtp (MailHog), or postmark.
41 SHITHUB_AUTH__EMAIL_BACKEND=stdout
42 # When email_backend=smtp:
43 SHITHUB_AUTH__SMTP__ADDR=127.0.0.1:1025
44 # When email_backend=postmark:
45 # SHITHUB_AUTH__POSTMARK__SERVER_TOKEN=...
46
47 # AEAD key for at-rest TOTP secrets (S06). Generate once and persist —
48 # rotating without re-encrypting every row breaks every existing 2FA login.
49 # SHITHUB_TOTP_KEY=$(openssl rand -base64 32)