feat: add NATS JetStream message broker
Añadido NATS con JetStream habilitado para streaming de mensajes y comunicación entre microservicios. Configuración: - Puerto 4222: Cliente NATS - Puerto 8222: HTTP Monitoring - Puerto 6222: Clustering - Credenciales: nats/nats123 - JetStream con 23.42 GB RAM y 694 GB storage - Persistencia en volumen nats-data
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
services:
|
||||
nats:
|
||||
image: nats:latest
|
||||
container_name: nats
|
||||
ports:
|
||||
- "4222:4222" # NATS client port
|
||||
- "8222:8222" # HTTP monitoring port
|
||||
- "6222:6222" # Cluster port
|
||||
command:
|
||||
- "-js" # Enable JetStream
|
||||
- "-sd" # Store directory
|
||||
- "/data"
|
||||
- "-m" # Enable monitoring
|
||||
- "8222"
|
||||
- "--user"
|
||||
- "nats"
|
||||
- "--pass"
|
||||
- "nats123"
|
||||
volumes:
|
||||
- nats-data:/data
|
||||
restart: unless-stopped
|
||||
healthcheck:
|
||||
test: ["CMD", "wget", "--spider", "-q", "http://localhost:8222/healthz"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 3
|
||||
|
||||
volumes:
|
||||
nats-data:
|
||||
Reference in New Issue
Block a user