version: '2'
services:
  nginx:
    image: nginx
    links:
      - node1:node1
    ports:
      - "8080:80"
    volumes:
      - "./nginx/nginx.conf:/etc/nginx/nginx.conf"
      - "/nginx_cache"
      - "./static:/static:ro" #TODO: make sure that readonly causes no trouble
  node1:
    build: ./app
    ports:
      - "8080"
    volumes:
      - "./app:/app:rw" # TODO: make sure that readonly causes no trouble
      - "./static:/static:rw"
      - "/app/node_modules"



version: '2'
services:
  nginx:
    image: nginx
    links:
      - node1:node1
    ports:
      - "8080:80"
    volumes:
      - "./nginx/nginx.conf:/etc/nginx/nginx.conf"
      - "/nginx_cache"
      - "./static:/static:ro" #TODO: make sure that readonly causes no trouble
    restart: unless-stopped
  node1:
    build: ./app
    ports:
      - "8080"
    volumes:
      - "./app:/app:rw" # TODO: make sure that readonly causes no trouble
      - "./static:/static:rw"
      - "/app/node_modules"
    restart: unless-stopped



Make it restart unless stopped
Make it restart unless stopped
