docker-compose.yml

Summary

Maintainability
Test Coverage
version: "3.1"
services:
  tws:
    image: industrialninja/ib_gateway:latest
    env_file: .env
    ports:
      - 4004:${IB_PORT:-4002}
    environment:
      - TZ=America/NewYork

  ib-api:
    container_name: ib-api
    build:
      context: .
      dockerfile: ./api.Dockerfile
    links:
      - tws
    env_file: .env
    environment:
      - IB_HOST=tws
    volumes:
      - .:/usr/src/app
      # More info on the node_modules volume at:
      # http://jdlm.info/articles/2016/03/06/lessons-building-node-app-docker.html
      # under "The node_modules Volume Trick"
      - /usr/src/app/node_modules
      # Run nodemon with legacy watch
      # https://github.com/remy/nodemon#application-isnt-restarting
      # Ignore public/ because generating documentation programatically
      # on startup was causing an infinite loop
    depends_on:
      - tws