Skip to content

Add Dockerized app and multi-user Chainlit auth#37

Open
AminMahpour wants to merge 1 commit into
masterfrom
dev/docker-compose-deploy
Open

Add Dockerized app and multi-user Chainlit auth#37
AminMahpour wants to merge 1 commit into
masterfrom
dev/docker-compose-deploy

Conversation

@AminMahpour

Copy link
Copy Markdown
Owner

Summary

  • Add a Docker image and compose app service for running ChainAgents with the existing Postgres service
  • Add a local JSON-backed Chainlit user store with salted password hashes and support for add/list/remove flows
  • Wire Chainlit auth to the user store while keeping the legacy single-user env vars as a fallback
  • Update README and deployment tests to cover the new container and auth workflows

Testing

  • Added unit coverage for the user store, CLI user management commands, and auth routing
  • Added deployment tests for the Docker image and compose configuration
  • Full test suite passed locally

@AminMahpour AminMahpour marked this pull request as ready for review May 11, 2026 17:18

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a98c9e1bfb

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread chainlit_users.py
if not users_file.exists():
return {"version": STORE_VERSION, "users": {}}
try:
payload = json.loads(users_file.read_text(encoding="utf-8"))

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Wrap users-file I/O failures in UserStoreError

load_user_store only translates JSONDecodeError, so when CHAINLIT_AUTH_USERS_FILE points to an unreadable path or a directory, users_file.read_text() raises an OSError (for example PermissionError/IsADirectoryError) that bypasses the existing callers’ error handling (authenticate_user and run_users_cli only catch UserStoreError). In those cases, login attempts and chainagents users commands terminate with an unhandled exception instead of returning a clean auth failure or CLI error.

Useful? React with 👍 / 👎.

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.

1 participant