version: "3.8"

services:
  frontend_management:
    build:
      context: .
      dockerfile: Dockerfile
    container_name: elearning-frontend-management
    ports:
      - "3001:3001"
    security_opt:
      - apparmor=unconfined
    environment:
      - NODE_ENV=production
      - NUXT_PUBLIC_API_BASE_URL=${NUXT_PUBLIC_API_BASE_URL:-http://localhost:4000}
    restart: unless-stopped
    healthcheck:
      test: [ "CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:3001" ]
      interval: 30s
      timeout: 10s
      retries: 3
      start_period: 40s
    networks:
      - elearning-network

networks:
  elearning-network:
    driver: bridge
