version: '3'
services:
  {{dashCase name}}-api:
    container_name: {{dashCase name}}-api
    build:
      context: ./
    expose:
      - '3000'
    ports:
      - '3000:3000'
    volumes:
      - './environments:/app/environments'
      - './service-accounts:/app/service-accounts'
      - './src:/src'
      - './tests:/tests'
      - './coverage:/coverage'
    environment:
      - CI_TEST=true
    #   - GOOGLE_APPLICATION_CREDENTIALS=./service-accounts/sa.development.json
    entrypoint: npm run start:watch
  {{dashCase name}}-service-test:
    container_name: {{dashCase name}}-api-test
    build:
      context: ./
    expose:
      - '3001'
    ports:
      - '3001:3001'
    volumes:
      - './environments:/appp/environments'
      - './service-accounts:/appp/service-accounts'
      - './src:/appp/src'
      - './tests:/appp/tests'
      - './coverage:/appp/coverage'
    environment:
      - CI_TEST=true
    #   - GOOGLE_APPLICATION_CREDENTIALS=./service-accounts/sa.development.json
    entrypoint: npm test
  # {{dashCase name}}-api-production:
  #   container_name: {{dashCase name}}-service-api-production
  #   build:
  #     context: ./
  #     dockerfile: ./docker/deploy.Dockerfile
  #   expose:
  #     - '8080'
  #   ports:
  #     - '8080:8080'
  #   volumes:
  #     - './dist:/app/dist'
  #     - './package.json:/app/package.json'
  #   environment:
  #     - CI_TEST=true
  #     - GOOGLE_APPLICATION_CREDENTIALS=./service-accounts/sa.production.json
  #   entrypoint: npm run prod
