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:
@@ -162,9 +162,18 @@ validation — run it before pushing, since a red `test` job blocks the deploy.
|
||||
### Development
|
||||
|
||||
```
|
||||
cp .env.dev .env
|
||||
docker compose -f docker-compose.yml -f docker-compose.dev.yml up --build
|
||||
```
|
||||
|
||||
`.env.dev` is committed and holds only dummy values, so the stack starts
|
||||
without any real credential and cannot reach a real account. Features that
|
||||
need one fail at the provider, which is the point. It must become `.env`
|
||||
rather than be passed with `--env-file`, because several services read
|
||||
`env_file: ./.env` directly. Its Postgres passwords only match a `dbdata`
|
||||
volume created with them, and as in production only `POSTGRES_DB` is created
|
||||
automatically.
|
||||
|
||||
The override layer changes five services and disables one:
|
||||
|
||||
- **vue** — `npm run dev` instead of a one-shot build; `./vue` is bind-mounted
|
||||
|
||||
Reference in New Issue
Block a user