version: "3.9" networks: default: services: app: build: context: . dockerfile: Dockerfile # Overrides default command so things don't shut down after the process ends. command: sleep infinity env_file: - .env volumes: - ../..:/workspaces:cached - ./nsc:/nsc networks: - default # uncomment to use local SSH keys for dev container access #- type: bind # source: ~/.ssh/authorized_keys # target: /home/vscode/.ssh/authorized_keys # read_only: true # depends_on: # - nats # Use "forwardPorts" in **devcontainer.json** to forward a port locally. # nats-init: # image: natsio/nats-box # environment: # - NSC_HOME=/nsc # volumes: # - ./nsc:/nsc # - ./nats:/nats # - ./scripts:/scripts # networks: # - default # command: # - /scripts/nats_init.sh # nats: # image: "nats:alpine" # depends_on: # - nats-init # command: # - -c # - "/etc/nats/nats-server.conf" # - -D # volumes: # - ./nats/:/etc/nats # networks: # - default # restart: unless-stopped