3.6 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/master. The default branch ismaster, notmain. - 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. 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 writes these into a real .env file inside the stack's own directory on the host when it deploys. docker-compose.yml reads that same file (env_file: - .env), so nothing else needs to change 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.