Skip to content

feat: add multi-stage Dockerfile and enhanced docker-compose deployment guide#12

Open
sakshar2303 wants to merge 1 commit intobeckfexx:mainfrom
sakshar2303:issue-4-docker-compose
Open

feat: add multi-stage Dockerfile and enhanced docker-compose deployment guide#12
sakshar2303 wants to merge 1 commit intobeckfexx:mainfrom
sakshar2303:issue-4-docker-compose

Conversation

@sakshar2303
Copy link
Copy Markdown

Summary

This PR addresses Issue #4 by providing a more robust and user-friendly Docker deployment setup for BrainDB.

Key Changes

  • Multi-stage Docker Build: Refactored the Dockerfile to use a multi-stage approach. This reduces the final image size and improves security by running the application as a non-root user (bun).
  • Enhanced docker-compose.yml:
    • Added comprehensive environment variable mappings to allow easy configuration of LLM providers and security settings directly from a .env file.
    • Configured a named volume (braindb_data) to ensure SQLite database persistence across container restarts.
    • Added descriptive documentation comments for port and volume configurations.
  • Improved Documentation: Updated the README.md with a detailed "Docker (recommended)" section that explains persistence, port mapping, and initial setup steps.

Verification

  • Validated docker-compose.yml syntax using docker compose config.
  • Verified that volume mounts and internal paths are correctly mapped for SQLite persistence.
  • Confirmed the multi-stage build structure adheres to Bun's official deployment recommendations.

Fixes #4

@sakshar2303
Copy link
Copy Markdown
Author

please review and merge .

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.

Add Docker Compose deployment guide

1 participant