Add NATS-over-WebSocket compose for Coolify
Configures a single NATS 2.10 service exposing a WebSocket listener on :8080 (no_tls; Traefik terminates TLS at nats.volcanic.tes.gd) with env-driven username/password auth and a persisted JetStream store.
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
services:
|
||||
nats:
|
||||
image: nats:2.10-alpine
|
||||
restart: unless-stopped
|
||||
command: ["-c", "/etc/nats/nats-server.conf"]
|
||||
environment:
|
||||
- SERVICE_FQDN_NATS_8080
|
||||
- NATS_USER=${NATS_USER}
|
||||
- NATS_PASSWORD=${NATS_PASSWORD}
|
||||
volumes:
|
||||
- ./nats-server.conf:/etc/nats/nats-server.conf:ro
|
||||
- nats-data:/data
|
||||
expose:
|
||||
- "4222"
|
||||
- "8080"
|
||||
- "8222"
|
||||
healthcheck:
|
||||
test: ["CMD", "wget", "-qO-", "http://localhost:8222/healthz"]
|
||||
interval: 30s
|
||||
timeout: 5s
|
||||
retries: 3
|
||||
|
||||
volumes:
|
||||
nats-data:
|
||||
Reference in New Issue
Block a user