Skip to content

feat(docker): add containerized deployment - #213

Merged
grinev merged 2 commits into
grinev:mainfrom
iagorobo24-hub:feat/docker-support
Aug 26, 2026
Merged

feat(docker): add containerized deployment#213
grinev merged 2 commits into
grinev:mainfrom
iagorobo24-hub:feat/docker-support

Conversation

@iagorobo24-hub

@iagorobo24-hub iagorobo24-hub commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

Description

Adds Docker support for running OpenCode Telegram Bot as a container.

This is submitted separately from #209 as requested.

What changed

  • adds a multi-stage Docker image with application code and production
    dependencies built into the image;
  • runs the bot as a non-root user with dumb-init;
  • persists runtime state under /app/data;
  • adds a Docker Compose configuration;
  • keeps OpenCode as an external dependency configured through
    OPENCODE_API_URL;
  • adds Docker usage documentation.

Design notes

  • secrets and .env are not copied into the image;
  • source code, dist, and node_modules are not bind-mounted from the host;
  • no Docker healthcheck is added because the bot does not currently expose
    its own health endpoint;
  • port 4096 is not exposed by the bot image because it belongs to the
    OpenCode server.
  • Networking limitation: The provided docker-compose.yml uses
    network_mode: host because OpenCode by default binds to
    127.0.0.1:4096 only. This allows the container to reach the OpenCode
    server on the host without additional configuration.
    • Linux: network_mode: host works natively.
    • macOS/Windows (Docker Desktop 4.34+): host networking is supported when enabled in Settings → "Enable host networking".
    • If host networking is not available or not enabled, OpenCode must be configured to listen on 0.0.0.0 or a reachable IP, and OPENCODE_API_URL set accordingly.

Validation

  • clean Docker build: PASS
  • better-sqlite3 loads inside the container: PASS
  • Docker Compose config validation: PASS
  • lint: PASS
  • typecheck: PASS
  • build: PASS
  • tests: BASELINE_HANG_CONFIRMED (same pre-existing wizard hang on upstream main)

@grinev
grinev merged commit 253d9a3 into grinev:main Aug 26, 2026
1 check passed
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.

2 participants