Skip to content

Add Docker production setup#98

Closed
nicosuave wants to merge 3 commits intomainfrom
nicosuave/docker-production
Closed

Add Docker production setup#98
nicosuave wants to merge 3 commits intomainfrom
nicosuave/docker-production

Conversation

@nicosuave
Copy link
Copy Markdown
Member

Summary

Production Docker setup for sidemantic with single container supporting multiple server modes. Includes PostgreSQL wire protocol server (for BI tools) and MCP server (for AI/LLM integration).

  • Dockerfile: Multi-stage build with all database drivers. 781MB runtime image.
  • docker-entrypoint.sh: Mode control via SIDEMANTIC_MODE env var (serve/mcp/both)
  • CLI enhancement: --host flag on sidemantic serve for container networking
  • Documentation: Comprehensive README section with examples

Fully tested: psql queries, demo mode, semantic layer table access all verified.

- Dockerfile: Multi-stage build with all database drivers and optional dependencies (serve, mcp, all-databases). 781MB runtime image.
- docker-entrypoint.sh: Single container with SIDEMANTIC_MODE env var to control serve/mcp/both modes
- .dockerignore: Excludes unnecessary files for faster builds
- Add --host parameter to sidemantic serve CLI and config for container networking (0.0.0.0 support)
- README: Comprehensive Docker usage section with examples

Server fully tested: psql connections work, semantic layer tables queryable, demo mode verified.
Builds the image, starts the PG server in demo mode, and runs psql queries to verify semantic layer tables are accessible.
Copy link
Copy Markdown

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

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: c5ee9c2e48

ℹ️ 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".

# Build shared args from environment variables
ARGS=""
if [ -n "$SIDEMANTIC_CONNECTION" ]; then
ARGS="$ARGS --connection $SIDEMANTIC_CONNECTION"
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Limit shared args to flags supported by mcp-serve

docker-entrypoint.sh adds --connection to the shared ARGS list and then passes that list to sidemantic mcp-serve in mcp/both modes, but mcp_serve only accepts directory, --db, and --demo (sidemantic/cli.py, mcp_serve signature). In any container run where SIDEMANTIC_CONNECTION is set, these modes fail during CLI parsing with an unknown-option error instead of starting MCP, so the documented environment-variable flow is broken for MCP (and for both, MCP exits and takes down the background PG process).

Useful? React with 👍 / 👎.

Replace passthrough SELECT * queries with GROUP BY queries that exercise
metric computation (product_count, avg_price, customer_count).
@nicosuave nicosuave closed this Feb 21, 2026
@nicosuave nicosuave deleted the nicosuave/docker-production branch February 21, 2026 19:05
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