mirror of
https://github.com/tiennm99/composes.git
synced 2026-10-11 03:13:16 +00:00
docs: keep personal values out of the examples
Record the convention in CLAUDE.md: .env.example is a template, so its values stay generic and the real ones are set per deployment in Coolify or Dokploy. Note the naming trap alongside it -- Compose interpolation reads the deploying shell's environment before the .env file, so a variable must not collide with one the shell already exports. The alloy README's example host is made generic to match.
This commit is contained in:
1 parent
2a4e635e09
commit
6924ba0424
2 files changed
+13
-1
No files matched your search
@@ -67,3 +67,15 @@ adding hardening or convention that the platform already provides.
|
|||||||
Every service reads secrets from a sibling `.env`. Never commit one — the root
|
Every service reads secrets from a sibling `.env`. Never commit one — the root
|
||||||
`.gitignore` covers `.env`/`*.env` and re-includes `.env.example`. Keep
|
`.gitignore` covers `.env`/`*.env` and re-includes `.env.example`. Keep
|
||||||
`.env.example` in sync whenever a compose file gains or drops a variable.
|
`.env.example` in sync whenever a compose file gains or drops a variable.
|
||||||
|
|
||||||
|
`.env.example` is a template for anyone, so every value in it stays generic —
|
||||||
|
the service's own name, a placeholder domain, or an empty string. Never a real
|
||||||
|
hostname, git identity, email, domain or account name. Personal values are set
|
||||||
|
per deployment, in the Coolify or Dokploy environment for that app, and live
|
||||||
|
only in the gitignored `.env`.
|
||||||
|
|
||||||
|
Compose interpolation reads the deploying shell's environment before the
|
||||||
|
`.env` file, so a variable must not share a name with anything the shell
|
||||||
|
already exports. `HOSTNAME` is the trap: it is set inside every container,
|
||||||
|
including the one Coolify itself runs in, and would silently win. Hence
|
||||||
|
`SERVICE_HOSTNAME` in `code-server` and `paseo`.
|
||||||
+1
-1
@@ -53,7 +53,7 @@ source, and under Fleet Management. The same token serves `remotecfg`,
|
|||||||
Prometheus and Loki basic-auth.
|
Prometheus and Loki basic-auth.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
export ALLOY_HOSTNAME=miti-jp REMOTECFG_ID=miti-jp ...
|
export ALLOY_HOSTNAME=example-host REMOTECFG_ID=example-host ...
|
||||||
docker compose up -d
|
docker compose up -d
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user