4.4 KiB
Docker Test Environment: SDE Meeting Toolkit
This doc sets up the toolkit in Docker, on your own machine, for testing. Use it before you hand the container off for company-wide deployment.
Prerequisites
- Install Docker Desktop, or Docker Engine and the Docker Compose plugin.
- Open a terminal.
- Run this command to confirm Docker works:
docker --version docker compose version
If either command fails, install Docker before you continue.
Step 1: Get the project
- Go to the
sde-meeting-toolkitfolder. - Confirm these files exist:
Dockerfile,docker-compose.yml,.env.example,server.js.
Step 2: Create your test environment file
- Copy
.env.exampleto a new file named.env, in the same folder. - Open
.envin a text editor. - Set a test value for each line:
ANTHROPIC_API_KEY=<a personal or trial key, for testing only> APP_USERNAME=tester APP_PASSWORD=test-password-123 RATE_LIMIT_MAX=5 RATE_LIMIT_WINDOW_MS=60000 - Save the file.
Use a personal or trial API key here, not the company-billed key. Keep the company key for the real deployment. Set APP_USERNAME and APP_PASSWORD so you can confirm the login gate works. RATE_LIMIT_MAX=5 with a 60 second window makes the rate limit easy to trigger on purpose, for testing.
.env is not tracked by Git. Docker Compose reads it automatically because docker-compose.yml lists it under env_file.
Step 3: Build the image
- Run this command in the
sde-meeting-toolkitfolder:docker compose build - Wait for the build to finish. The image is small; the app has no external dependencies to download.
Step 4: Start the container
- Run this command:
docker compose up -d - Run this command to confirm the container is running:
docker compose ps - Run this command to view the startup log:
docker compose logs - Confirm the log reports whether it found
ANTHROPIC_API_KEYand whether a login is required.
Step 5: Test in a browser
- Open a browser.
- Go to
http://localhost:5173. - Confirm the browser asks for a username and password.
- Enter the
APP_USERNAMEandAPP_PASSWORDvalues from your.envfile. - Confirm the toolkit's landing page loads, with links to both tools.
- Open each tool link and confirm it loads.
Step 6: Test the login gate
- Open a new private or incognito browser window.
- Go to
http://localhost:5173. - Enter a wrong password.
- Confirm the page rejects it and asks again.
Step 7: Test the AI draft button
- Open the Field Problem Workshop tool.
- Go to the Breadcrumbs panel.
- Write a problem statement for a breadcrumb.
- Click the AI draft button.
- Confirm the fields fill in, or confirm you get a clear error that names the cause (for example, a bad API key).
Step 8: Test the rate limit
- Click the AI draft button more than
RATE_LIMIT_MAXtimes within the time window (5 times within 60 seconds, with the test values above). - Confirm the next click returns a rate-limit message instead of a normal draft or a silent failure.
- Wait for the time window to pass, then confirm the button works again.
Step 9: Stop the container
- Run this command:
docker compose down - This stops and removes the container. It does not delete your
.envfile or the project folder.
Rebuild after a code change
- Edit the code as needed.
- Run this command:
docker compose up -d --build - This rebuilds the image and restarts the container with your changes.
Troubleshooting
Port 5173 is already in use.
Stop whatever else is using that port, or change the port mapping in docker-compose.yml from "5173:5173" to, for example, "5180:5173". Then open http://localhost:5180 instead.
The browser does not ask for a login.
Check that both APP_USERNAME and APP_PASSWORD are set in .env, with no typos in the variable names. Restart the container after any .env change: docker compose up -d --build.
The AI draft button reports a missing key.
Check that ANTHROPIC_API_KEY is set in .env and is a real key. Restart the container after the change.
Changes to the code do not appear.
Run docker compose up -d --build to rebuild the image. A plain docker compose up -d reuses the existing image and skips your changes.
Next: run the steps above in order. Report back once Step 5 loads the login prompt.