services:
  login:
    container_name: login
    build:
      context: .
    env_file:
      - .env
    ports:
      - '${APP_PORT}:${APP_PORT}'
    environment:
      - NODE_ENV=development
      - APP_NAME=login
      - CHOKIDAR_USEPOLLING=true # pakai polling supaya watch bekerja di dalam container
      - CHOKIDAR_INTERVAL=100
    volumes:
      - ./:/usr/src/app # **bind mount**: override kode yang di-copy di image
      - /usr/src/app/node_modules # supaya node_modules di container dipakai, bukan ditimpa oleh host kosong
    command: ['npm', 'run', 'start:dev']
    restart: unless-stopped
    networks:
      - ppa

networks:
  ppa:
    external: true
    name: ppa
