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: