version: '3.9'

services:
  dev-web-lti:
    container_name: dev-web-lti
    build:
      context: .
      dockerfile: Dockerfile
    ports:
      - '3002:3000'
    env_file:
      - .env
    environment:
      NODE_ENV: production
      APP_ENV: production
    networks:
      - dev-lti-network
    restart: always
    deploy:
      resources:
        limits:
          cpus: '3.0'
          memory: 3G
        reservations:
          cpus: '1.0'
          memory: 512M
    extra_hosts:
      - 'host.docker.internal:host-gateway'
    # Optional: aktifkan healthcheck jika punya endpoint
    # healthcheck:
    #   test: ["CMD-SHELL", "curl -fsS http://localhost:3000/api/healthz || exit 1"]
    #   interval: 10s
    #   timeout: 3s
    #   retries: 10
    #   start_period: 15s

networks:
  dev-lti-network:
    external: true
