Fix Portainer deploy: use variable substitution instead of env_file

This commit is contained in:
2026-09-04 13:30:21 -07:00
parent a0eec98839
commit 50424acad1
3 changed files with 15 additions and 4 deletions

View File

@@ -4,6 +4,7 @@ All notable changes to this project are logged here, newest first. This file sta
## 2026-09-04
- Fixed: Portainer stack deploy failed with `env file /data/compose/44/.env not found`. Cause: `docker-compose.yml` used `env_file: - .env`, which requires a real file on disk; Portainer's UI-entered environment variables satisfy `${VAR}` substitution in the compose file but do not create that file. Changed `docker-compose.yml` to reference each setting as `${VAR:-default}` under `environment:` instead, which works both for a real local `.env` (auto-loaded by Compose for substitution) and for values entered directly in Portainer. Corrected the wrong explanation of this in `PORTAINER_DEPLOY.md`.
- Changed: renamed the default branch from `master` to `main`, both locally and in `PORTAINER_DEPLOY.md`'s repository reference. The old name was just `git init`'s local fallback default, not a deliberate choice.
- Added: `PORTAINER_DEPLOY.md`, a step-by-step guide for deploying this as its own stack in Portainer, pulled straight from the Gitea repo, including how to set environment variables through Portainer's UI since `.env` is not committed.
- Changed: swapped `ANTHROPIC_API_KEY` from a personal key to a company-owned key.