version: '3'

services:
  api:
    build:
      context: ./
      dockerfile: Dockerfile-api.dockerfile
    container_name: canap_api
    volumes:
      - ./API:/var/www/html/
    ports:
      - "8181:80"

  gest:
    image: node:15-alpine
    container_name: canap_gest
    user: node
    working_dir: /home/node/app
    depends_on:
      - api
    environment:
      - NODE_ENV=development  #production
    volumes:
      - ./Site:/home/node/app
    ports:
      - "8080:8080"
    entrypoint: /bin/sh
    command:
      - "-c"
      - npm i && npm run serve-docker

networks:
  default:
    external:
      name: canap_network