# Cribbed from https://github.com/DanWahlin/CodeWithDanDockerServices
#. Run docker-compose build
#. Run docker-compose up
    
version: "3.1"
 
services:
        
    node:
      container_name: node-front
      build: 
        context: .
        dockerfile: .docker/node-front.dockerfile
      ports:
        - "8080:8080"
      volumes:
        - .:/var/www/simpleshelf
        - ./config:/opt/simpleshelf/config
      working_dir: /var/www/simpleshelf
      depends_on:
        - couchdb
      networks:
        - simpleshelf-network
      
    couchdb:
      container_name: couchdb
      image: apache/couchdb
      volumes:
        - ./docker-couchdb/data:/opt/couchdb/data
        - ./docker-couchdb/etc:/opt/couchdb/etc/
      ports:
        # Remove "5984:" to lock out external access.
        - "5984:5984"
      networks:
        - simpleshelf-network

networks:
    simpleshelf-network:
      driver: bridge

# Cribbed from https://github.com/DanWahlin/CodeWithDanDockerServices
#. Run docker-compose build
#. Run docker-compose up
    
version: "3.1"
 
services:
        
    node:
      container_name: node-front
      build: 
        context: .
        dockerfile: .docker/node-front.dockerfile
      environment:
        - NODE_ENV
      ports:
        - "8080:8080"
      volumes:
        - ./server:/var/www/simpleshelf
        - ./node_modules:/var/www/simpleshelf/node_modules
        - ./output-public:/var/www/simpleshelf/output-public
        - ./server/config:/opt/simpleshelf/config
        - ./server/log:/var/log
      working_dir: /var/www/simpleshelf
      depends_on:
        - couchdb
      networks:
        - simpleshelf-network
      
    couchdb:
      container_name: couchdb
      image: apache/couchdb
      volumes:
        - ./docker-couchdb/data:/opt/couchdb/data
        - ./docker-couchdb/etc:/opt/couchdb/etc/
      ports:
        # Remove "5984:" to lock out external access.
        - "5984:5984"
      networks:
        - simpleshelf-network

networks:
    simpleshelf-network:
      driver: bridge

Isolate node server to separate directory
Isolate node server to separate directory
