services: nats: image: nats:2.9.19-alpine restart: unless-stopped ports: - 4222:4222 - 8222:8222 volumes: - ./nats/nats-server.conf:/nats-server.conf - nats-data:/opt/storage command: ["-c", "/nats-server.conf"] networks: - nats volumes: nats-data: driver: local networks: nats: external: true