Skip to content

chore: update Docker deployment for standalone backend#188

Open
aditya-damerla128 wants to merge 2 commits into
codex/manager-auth-backendfrom
chore/docker-deployment-issue-178
Open

chore: update Docker deployment for standalone backend#188
aditya-damerla128 wants to merge 2 commits into
codex/manager-auth-backendfrom
chore/docker-deployment-issue-178

Conversation

@aditya-damerla128

Copy link
Copy Markdown
Collaborator

Summary

  • rebuild the reference-server Dockerfile around the standalone backend build order: spec, clients/typescript, then reference-server
  • keep SQLite and uploaded file state under configurable persistent storage via DATA_DIR/DB_PATH and /data in Docker
  • add Docker build-context hygiene with a root .dockerignore
  • document docker run, env-file, and GitHub Actions secret/variable deployment paths
  • allow manager admins to be configured by forwarded user id or email on first trusted login

Stack

Verification

  • npm run build (spec)
  • npm run build (clients/typescript)
  • npm run build (reference-server)
  • npm test (reference-server): 42/42 passing
  • docker build -f reference-server/Dockerfile -t ozwellai-reference-server:issue-178-auth-admin .
  • Docker run with mounted /data, TRUST_FORWARD_AUTH_HEADERS=true, ADMIN_EMAILS=admin@example.test
  • verified /health, Docker health, first-login admin assignment, manager agent creation, and chat completion with the created agent key

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the reference-server’s production Docker deployment and runtime persistence configuration, while extending manager-admin bootstrap logic to support admin assignment by email on first trusted login.

Changes:

  • Reworks the reference-server/Dockerfile into a multi-package build (spec → TS client → reference-server) and sets Docker-default runtime env/volume for persistent state.
  • Adds DATA_DIR support so uploaded files and default SQLite DB location can live under a configurable persistent directory.
  • Extends manager admin bootstrap configuration to allow admin assignment via ADMIN_EMAILS (case-insensitive), with corresponding test coverage and documentation updates.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
reference-server/Dockerfile Rebuilds Docker image around standalone backend build order and sets runtime defaults/healthcheck.
.dockerignore Adds root build-context exclusions to keep local/dev artifacts out of images.
reference-server/src/storage/agents.ts Adds DATA_DIR-based default DB path and admin-by-email bootstrap support.
reference-server/src/routes/files.ts Stores uploaded file state under DATA_DIR instead of a fixed ./data path.
reference-server/test/manager-auth.test.js Tests admin bootstrap via configured emails in addition to external user IDs.
reference-server/README.md Documents Docker build/run, env-file usage, and storage expectations.
reference-server/.env.example Adds example config for DATA_DIR/DB_PATH and manager forwarded-header admin options.

Comment thread reference-server/Dockerfile Outdated
Comment thread reference-server/test/manager-auth.test.js
@aditya-damerla128 aditya-damerla128 force-pushed the chore/docker-deployment-issue-178 branch from 01f752f to eb01e10 Compare June 15, 2026 19:35
@aditya-damerla128 aditya-damerla128 force-pushed the chore/docker-deployment-issue-178 branch from ee87821 to 28e7b11 Compare June 18, 2026 15:00
@aditya-damerla128

Copy link
Copy Markdown
Collaborator Author

Startup Steps:
git clone https://github.com/mieweb/ozwellai-api.git
cd ozwellai-api
git switch chore/docker-deployment-issue-178

docker build -f reference-server/Dockerfile -t ozwellai-reference-server:pr-188 .

docker volume create ozwell-reference-data

docker run -d
--name ozwell-reference-server
--restart unless-stopped
-p 3000:3000
--mount type=volume,source=ozwell-reference-data,target=/data
-e TRUST_FORWARD_AUTH_HEADERS=true
-e ADMIN_EMAILS=adamerla128@gmail.com
-e LLM_BASE_URL="https://YOUR_LLM_BASE_URL"
-e LLM_API_KEY="YOUR_LLM_API_KEY"
-e LLM_ALLOWED_MODELS="gpt-4o-mini,gpt-4o"
ozwellai-reference-server:pr-188

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update Docker Deployment and Dockerfile per Gap Analysis Discussion

2 participants