ddev bootstrap: make app/.env optional, add .env.example

Fresh clones errored out on `ddev start` because the compose file's
env_file: pointed at app/.env (gitignored). No env vars are actually
required by the code — STATE_DIR is the only one and has a default.

- Switch env_file to the path:+required:false form (Docker Compose
  2.24+; bundled with DDEV) so missing app/.env is non-fatal.
- Commit app/.env.example as documentation for contributors who do
  need overrides.
This commit is contained in:
Oleks
2026-05-20 14:00:37 +03:00
parent 14f57885d8
commit cd2a663935
2 changed files with 16 additions and 1 deletions
+12
View File
@@ -0,0 +1,12 @@
# Local-dev environment variables for the emdash dev container.
# Copy this file to `app/.env` and edit if you need to override defaults.
# Loaded by .ddev/docker-compose.emdash.yaml (env_file, required: false) —
# everything here is optional; the dev server boots fine with no overrides.
# Override where emdash stores data.db and uploads/ on disk.
# Defaults to the working directory (which is /app inside the container).
# STATE_DIR=/app/state
# Astro / emdash:
# HOST, PORT, NODE_ENV, EMDASH_ALLOWED_ORIGINS, EMDASH_SITE_URL are set in
# the compose `environment:` block — set them here only to override.