# Run docker-compose build
# Run docker-compose up
# Visit http://localhost
# Live long and prosper

version: '3.9'

services:

  nginx:
    container_name: nginx-angular-jumpstart
    image: nginx-angular-jumpstart
    build:
      context: .
      dockerfile: .docker/nginx.dockerfile
    ports:
      - "80:80"
      - "443:443"
    depends_on: 
      - node
    networks:
      - app-network

  node:
    container_name: node-service-jumpstart
    image: node-service-jumpstart
    build:
      context: .
      dockerfile: .docker/node.dockerfile
    environment:
      - NODE_ENV=production
      - CONTAINER=true
    ports:
      - "8080:8080"
    networks:
      - app-network

  # Can uncomment to get cAdvisor going on Mac/Linux. Not for Windows though. 
  # cadvisor:
  #   container_name: cadvisor
  #   image: google/cadvisor
  #   volumes:
  #     - /:/rootfs:ro
  #     - /var/run:/var/run:rw
  #     - /sys:/sys:ro
  #     - /var/lib/docker/:/var/lib/docker:ro
  #   ports:
  #     - "9000:8080"
  #   networks:
  #     - app-network

networks:
  app-network:
    driver: bridge
# Run docker-compose build
# Run docker-compose up
# Visit http://localhost
# Live long and prosper

version: '3.7'

services:

  nginx:
    container_name: nginx-angular-jumpstart
    image: nginx-angular-jumpstart
    build:
      context: .
      dockerfile: .docker/nginx.dockerfile
    ports:
      - "80:80"
      - "443:443"
    depends_on: 
      - node
    networks:
      - app-network

  node:
    container_name: node-service-jumpstart
    image: node-service-jumpstart
    build:
      context: .
      dockerfile: .docker/node.dockerfile
    environment:
      - NODE_ENV=production
      - CONTAINER=true
    ports:
      - "8080:8080"
    networks:
      - app-network

  # Can uncomment to get cAdvisor going on Mac/Linux. Not for Windows though. 
  # cadvisor:
  #   container_name: cadvisor
  #   image: google/cadvisor
  #   volumes:
  #     - /:/rootfs:ro
  #     - /var/run:/var/run:rw
  #     - /sys:/sys:ro
  #     - /var/lib/docker/:/var/lib/docker:ro
  #   ports:
  #     - "9000:8080"
  #   networks:
  #     - app-network

networks:
  app-network:
    driver: bridge
Change from 3.9 to 3.7 due to Kompose limitation
Change from 3.9 to 3.7 due to Kompose limitation
