35 lines
740 B
YAML

services:
nats_jetstream:
image: nats:2-alpine
hostname: nats_jetstream
command: ['-c', '/etc/nats/nats.conf']
env_file:
- /etc/fluxer/nats_jetstream.env
volumes:
- ./nats.conf:/etc/nats/nats.conf:ro
- nats_jetstream_data:/data
networks:
- fluxer-shared
ports:
- '4223:4222'
deploy:
replicas: 1
restart_policy:
condition: on-failure
delay: 10s
max_attempts: 3
healthcheck:
test: ['CMD-SHELL', 'wget -q --spider http://localhost:8222/healthz || exit 1']
interval: 10s
timeout: 5s
retries: 5
start_period: 10s
networks:
fluxer-shared:
external: true
volumes:
nats_jetstream_data:
driver: local