- docker-compose.yml now attaches the toolkit's container to the external 'proxy' Docker network, the same one NPM already uses to reach Work Package Suite's internal nginx container by name (confirmed via NPM's generated proxy_host/11.conf). - Document the exact NPM Proxy Host setup for MVP.controls.dev in PORTAINER_DEPLOY.md. - Update CHANGELOG.
5.4 KiB
Deploy to Portainer
This doc sets up the toolkit as its own stack in Portainer, pulled directly from Gitea. It assumes the repo is public or internal-open on your Gitea instance, so Portainer needs no Git credentials to pull it.
Repo: https://primegit.primecontrols-dev.com/m.mabrey/sde-meeting-toolkit.git
Step 1: Add the stack
- Open Portainer.
- Go to Stacks.
- Click Add stack.
- Name it
sde-meeting-toolkit. - Set Build method to Repository.
- Set Repository URL to
https://primegit.primecontrols-dev.com/m.mabrey/sde-meeting-toolkit.git. - Set Repository reference to
refs/heads/main. - Set Compose path to
docker-compose.yml. This is the default path; the file sits at the root of the repo. - Leave Authentication off. The repo does not need credentials to pull.
Step 2: Set environment variables
.env is not in the repo on purpose; it holds secrets and is listed in .gitignore. docker-compose.yml reads each setting through ${VARIABLE_NAME} substitution instead of a literal env_file, so it works whether the value comes from a real .env next to the file (local and Docker Desktop use) or from Portainer's own stack settings (Git-pull use, where no .env file exists).
Portainer's stack editor has its own Environment variables section, below the repository settings. Add each of these as a name and value pair.
| Name | Value |
|---|---|
ANTHROPIC_API_KEY |
The company API key. |
APP_USERS |
Comma-separated user:password pairs, for example alice:pass1,bob:pass2. Leave blank for no login. |
APP_USERNAME |
Leave blank unless you use the legacy single-login mode instead of APP_USERS. |
APP_PASSWORD |
Leave blank unless you use the legacy single-login mode. |
RATE_LIMIT_MAX |
20 |
RATE_LIMIT_WINDOW_MS |
300000 |
TOKEN_LIMIT_PER_USER |
0 (off). Set a positive number only if you decide to turn the quota back on. |
TOKEN_USAGE_FILE |
./data/token-usage.json |
MOCK_AI |
false |
Portainer passes these to Compose as substitution values for the ${VARIABLE_NAME} references in docker-compose.yml. No .env file needs to exist on the host for this to work.
Step 3: Deploy
- Click Deploy the stack.
- Wait for the build to finish. The image is small; the app has no external dependencies to install.
Step 4: Verify
- Go to Containers, find
sde-meeting-toolkit, and open Logs. - Confirm the log reports:
ANTHROPIC_API_KEY loaded: AI draft button is live.- Either
Login required: N named user(s) configured.orNo login required: ..., matching what you set inAPP_USERS. No per-user token quota: TOKEN_LIMIT_PER_USER is unset or 0 (unlimited, feature on the back burner).
- Open the container's mapped address in a browser (port
5173by default, perdocker-compose.yml). Confirm the toolkit's landing page loads. - If you set
APP_USERS, confirm the browser asks for a login before the page loads. - Try the AI draft button on the Field Problem Workshop tool and confirm it returns a real draft.
Redeploying after a code change
- Push the change to the Gitea repo (
git push) from your machine, same as always. - In Portainer, open the
sde-meeting-toolkitstack. - Click Pull and redeploy (or the equivalent update action in your Portainer version).
Setting up a Gitea webhook to trigger this automatically is possible later, but is not set up yet. For now, redeploy manually after each push.
The data folder
docker-compose.yml mounts ./data:/app/data so the per-user token quota file survives a restart, if that feature is ever turned back on. Portainer creates this folder under the stack's own directory on the host. With TOKEN_LIMIT_PER_USER=0, nothing is written there today; the mount is harmless and already in place for when it's needed.
Giving it a real address through Nginx Proxy Manager
docker-compose.yml joins the toolkit's container to a Docker network named proxy. This is the same network Nginx Proxy Manager (NPM) uses to reach Work Package Suite's own internal nginx container by name. The proxy network must already exist on the host before you deploy this stack; docker-compose.yml does not create it (external: true), it only joins it.
- Deploy or redeploy the
sde-meeting-toolkitstack as described above. Confirm in Portainer that the container is attached to theproxynetwork (check the container's network list). - Open NPM's own web admin UI (not Portainer). This is a separate address, usually the Docker host's IP or hostname on port
81, for examplehttp://<host>:81. - Go to Hosts > Proxy Hosts > Add Proxy Host.
- Set Domain Names to
MVP.controls.dev. - Set Scheme to
http. - Set Forward Hostname / IP to
sde-meeting-toolkit. NPM resolves this by Docker container name over the sharedproxynetwork, the same way it resolves Work Package Suite'snginx_webserver. - Set Forward Port to
5173. - On the SSL tab, request a new Let's Encrypt certificate for
MVP.controls.dev, the same way the existingwp.controls.devhost is set up. - Save. Confirm
MVP.controls.devloads the toolkit's landing page in a browser.
DNS for MVP.controls.dev must point at the same address the existing wp.controls.dev record points at, so it reaches this Docker host and NPM. If that record does not already exist, it needs to be added wherever controls.dev's DNS is managed, before step 9 will succeed.