Skip to content

Kamal 2 w/ embedded NATS#19

Open
prog-supdex wants to merge 1 commit intoanycable:mainfrom
prog-supdex:feat/-kamal-deploy
Open

Kamal 2 w/ embedded NATS#19
prog-supdex wants to merge 1 commit intoanycable:mainfrom
prog-supdex:feat/-kamal-deploy

Conversation

@prog-supdex
Copy link

@prog-supdex prog-supdex commented Jun 6, 2025

What is the purpose of this pull request?

Add two single‑server deployment options via Kamal 2:

  1. HTTP Broadcast (SQLite + AnyCable HTTP adapter, no Redis/PostgreSQL)
  2. Embedded NATS (single anycable‑go instance runs both WebSocket server and embedded NATS; Rails/RPC connect via NATS)
  3. Cluster-Mode Embedded NATS (two anycable‑go instances form an embedded NATS cluster across separate hosts via WS_NATS_CLUSTER_HOST and WS_NATS_HOST)

All options allow deploying the stack on one or more hosts without external dependencies.

Changes overview

  • config/deploy.yml
    • Default single-server template using HTTP broadcast with SQLite.
  • config/deploy_single_server_nats.yml
    • Single-server template with embedded NATS (ports 4242/4242).
  • config/deploy_cluster_nats.yml
    • Cluster-mode template:
      • Seed node on WS_NATS_CLUSTER_HOST with client port 4242 and cluster port 4243
      • Second node on WS_NATS_HOST with client port 4322 and cluster port 4323, routing to the seed
  • README.md
    • Added ENV table
    • Added sections for single-server and cluster-mode Embedded NATS.

Checklist

[ ] I've added a Changelog entry 
[ ] I've added tests for this change (N/A for deployment scripts)
[x] I've described this change in documentation
[ ] I've fixed all review comments

@palkan palkan changed the title support kamal 2 deploy Kamal 2 Jun 28, 2025
@palkan palkan changed the title Kamal 2 Kamal 2 w/ embedded NATS Jun 28, 2025
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