version: "3"
services:
  web-server:
    image: emission-server
    depends_on:
      - db
    environment:
      - DB_HOST=db
      - WEB_SERVER_HOST=0.0.0.0
    deploy:
      replicas: 1
      restart_policy:
        condition: on-failure
    ports:
      - "8080:8080"
    networks:
      - emission
  db:
    image: mongo:latest
    deploy:
      replicas: 1
      restart_policy:
        condition: on-failure
    ports:
      - "27017:27017"
##Mount data volumes at local node.
    networks:
       - emission
networks:
  emission:
version: "3"
services:
  web-server:
    image: emission-server
    depends_on:
      - db
    environment:
      - DB_HOST=db
      - WEB_SERVER_HOST=0.0.0.0
    deploy:
      replicas: 1
      restart_policy:
        condition: on-failure
    ports:
      #This is a default port mapping. In production you might want to use 80:8080,
      - "8080:8080"
    networks:
      - emission
  db:
    image: mongo:latest
    deploy:
      replicas: 1
      restart_policy:
        condition: on-failure
    ports:
      - "27017:27017"
#If you want to persist the data in the DB you need to mount a volume.
    #Instructions can be found here: https://docs.docker.com/compose/compose-file/#volume-configuration-reference
    networks:
       - emission
networks:
  emission:
Add comments to compose files
Add comments to compose files
