Skip to content

feat: add NATS template#748

Open
quochuydev wants to merge 3 commits intoDokploy:canaryfrom
quochuydev:feat/add-natsio-template
Open

feat: add NATS template#748
quochuydev wants to merge 3 commits intoDokploy:canaryfrom
quochuydev:feat/add-natsio-template

Conversation

@quochuydev
Copy link
Copy Markdown
Contributor

@quochuydev quochuydev commented Mar 18, 2026

What is this PR about?

New PR of NATS — a high-performance, open-source messaging system for cloud-native applications, IoT, and microservices.

Checklist

Before submitting this PR, please make sure that:

Screenshots or Videos

Greptile Summary

This PR adds a new NATS messaging broker template (blueprints/nats/) with a pinned Docker image (nats:2.10.24-alpine), a config file mount that enables token-based authentication and WebSocket support, monitoring and WebSocket domains, and registers the template in meta.json. The template structure is sound and consistent with repository conventions.

Key issues found:

  • Accidental Strapi deletion: The entire Strapi entry was removed from meta.json — this is unrelated to the NATS PR and appears to be caused by a merge conflict or outdated base branch. The blueprints/strapi/ directory still exists, so Strapi would silently disappear from the template registry.
  • Unused data volume: nats-data:/data is mounted in docker-compose.yml but the nats.conf does not include a store_dir directive, so the volume will never be written to unless JetStream is manually configured post-deploy.
  • Logo format: A JPEG (nats.jpeg) is used instead of the preferred SVG format per contribution guidelines.

Confidence Score: 2/5

  • Not safe to merge — the accidental Strapi entry deletion from meta.json must be resolved first.
  • The NATS blueprint itself is well-structured and follows conventions, but the unintentional removal of the Strapi entry from meta.json is a blocking issue. Merging as-is would silently remove a working template from the registry without any corresponding blueprint deletion.
  • meta.json requires immediate attention to restore the accidentally deleted Strapi entry.

Comments Outside Diff (2)

  1. meta.json, line 5969-5984 (link)

    P2 Accidental Strapi entry deletion

    This PR removes the entire Strapi entry from meta.json, but the PR description only mentions adding the NATS template. This appears to be an accidental deletion — possibly caused by a merge conflict or working off an outdated base branch.

    The blueprints/strapi/ directory still exists in the repository, so removing its metadata entry would make it disappear from the template registry without removing the underlying blueprint. Please restore the Strapi entry.

  2. blueprints/nats/nats.jpeg, line 1 (link)

    P2 Logo should prefer SVG format

    Per the project's contribution guidelines (AGENTS.md), logos should be SVG format at approximately 128×128px. A JPEG logo may appear blurry or pixelated at different display sizes. Consider replacing nats.jpeg with an SVG version — the official NATS logo is available as an SVG from the NATS branding resources.

    Rule Used: AGENTS.md (source)

Last reviewed commit: "feat: add NATS templ..."

Greptile also left 1 inline comment on this PR.

Context used:

  • Rule used - AGENTS.md (source)

@dosubot dosubot bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Mar 18, 2026
@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 18, 2026

built with Refined Cloudflare Pages Action

⚡ Cloudflare Pages Deployment

Name Status Preview Last Commit
templates ✅ Ready (View Log) Visit Preview 70bb6fa

- 8080
command: ["-c", "/etc/nats/nats.conf"]
volumes:
- nats-data:/data
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 Volume mounted but JetStream not configured

The nats-data:/data volume is declared and mounted, but the nats.conf file (defined in template.toml) does not include a store_dir directive pointing to /data. Without store_dir: /data in the NATS config, JetStream persistence won't use this volume and it will remain empty.

If JetStream is not intended to be enabled, the volume can be removed. If persistence is desired, add store_dir: /data and jetstream {} to the config:

jetstream {
  store_dir: /data
}

Adds NATS 2.10.24 messaging server with token-based authentication
and native WebSocket support (port 8080) for browser clients.
@quochuydev
Copy link
Copy Markdown
Contributor Author

quochuydev commented Mar 18, 2026

port 8080 works perfect

curl -i -N --http1.1 \
-H "Connection: Upgrade" \
-H "Upgrade: websocket" \
-H "Sec-WebSocket-Version: 13" \
-H "Sec-WebSocket-Key: dGhlIHNhbXBsZSBub25jZQ==" \
https://nats.example.com

port 8222 works fine.

Screenshot 2026-03-18 at 16 46 50

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

new-template size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant