web:
  image: nginx:latest
  container_name: trading-web-nginx
  ports:
    - "8080:80"
    - "8443:443"
  volumes:
    - ./:/var/www/trading
    - ./docker/site.conf:/etc/nginx/conf.d/site.conf
  links:
    - php
node:
    image: node:argon
    container_name: trading-node
    volumes:
      - ./node/:/usr/src/app
    working_dir: /usr/src/app
    command: sh -c 'npm install; npm start'
    ports:
      - "3000:3000"
php:
    build: ./
    container_name: trading-php-fpm
    volumes:
      - ./:/var/www/trading
    links:
    - mysql
    - node
    working_dir: /var/www/trading
mysql:
    image: mysql
    container_name: trading-mysql
    ports:
      - 3308:3306
    environment:
      MYSQL_ROOT_PASSWORD: "nowsecure1"
    volumes:
      - ~/storage/docker/mysql-datadir:/var/lib/mysql
