services:
  ema-portal:
    build:
      context: .
      dockerfile: Dockerfile
      target: portal      
      secrets:
        - npmrc
    ports:
      - "${EMA_PORTAL_PORT:-8021}:80"
    env_file:
      - apps/portal/.env

  ema-backoffice:
    build:
      context: .
      dockerfile: Dockerfile
      target: backoffice      
      secrets:
        - npmrc
    ports:
      - "${EMA_BACKOFFICE_PORT:-8022}:80"
    env_file:
      - apps/backoffice/.env

secrets:
  npmrc:
    file: .npmrc
