|
|
@@ -29,7 +29,11 @@ docker run --rm nineseconds/mtg:2 generate-secret --hex YOUR_DOMAIN
|
|
29
|
29
|
|
|
30
|
30
|
# 3. Configure:
|
|
31
|
31
|
# - .env (or export) → DOMAIN=your.domain # used by HAProxy + Caddy
|
|
32
|
|
-# - mtg-config.toml → paste the secret
|
|
|
32
|
+# - render mtg-config.toml from the tracked template
|
|
|
33
|
+# (the rendered file is gitignored — secret stays out of git):
|
|
|
34
|
+MTG_SECRET=<secret-from-step-2> envsubst < mtg-config.toml.example > mtg-config.toml
|
|
|
35
|
+# (Or `cp mtg-config.toml.example mtg-config.toml` and edit ${MTG_SECRET}
|
|
|
36
|
+# by hand if you don't have envsubst.)
|
|
33
|
37
|
|
|
34
|
38
|
# 4. (Optional) put your site content into www/
|
|
35
|
39
|
|
|
|
@@ -120,6 +124,7 @@ domain's DNS A/AAAA record points to this server before starting.
|
|
120
|
124
|
|---|---|
|
|
121
|
125
|
| `docker-compose.yml` | Service definitions |
|
|
122
|
126
|
| `haproxy.cfg` | SNI routing rules (reads `$DOMAIN` from the environment) |
|
|
123
|
|
-| `mtg-config.toml` | mtg proxy config — **paste your secret** |
|
|
|
127
|
+| `mtg-config.toml.example` | mtg proxy config template — render with `envsubst` or copy + edit |
|
|
|
128
|
+| `mtg-config.toml` | Rendered mtg proxy config (gitignored, contains your secret) |
|
|
124
|
129
|
| `Caddyfile` | Web server config (auto-HTTPS) |
|
|
125
|
130
|
| `www/` | Static site content served by Caddy |
|