name: canvas-rce-api

services:
  web:
    container_name: canvas-rce-api-web
    build: .
    environment:
      PORT: 80
      NODE_ENV: development
      STATSD_HOST: 127.0.0.1
      STATSD_PORT: 8125
      ECOSYSTEM_SECRET: "astringthatisactually32byteslong"
      ECOSYSTEM_KEY: "astringthatisactually32byteslong"
      CIPHER_PASSWORD: TEMP_PASSWORD
      # HTTP_PROTOCOL_OVERRIDE: http
    labels:
      - traefik.enable=true
      - traefik.http.middlewares.rce-cors.headers.accesscontrolallowmethods=GET,POST,OPTIONS,PUT,PATCH
      - traefik.http.middlewares.rce-cors.headers.accesscontrolallowheaders=*
      - traefik.http.middlewares.rce-cors.headers.accesscontrolalloworiginlist=*
      - traefik.http.middlewares.rce-cors.headers.accesscontrolmaxage=100
      - traefik.http.middlewares.rce-cors.headers.addvaryheader=true
    networks:
      default:
        aliases:
          - canvas-rce-api-web
          - canvas-rce-api-web.$INST_DOMAIN
    volumes:
      - .:/usr/src/app
    command:
      - npm
      - run
      - start:dev
networks:
  default:
    external: true
    name: "inst_shared"
