version: '3.8'

services:
  app:
    build:
      context: ./app
      dockerfile: Dockerfile
    volumes:
      - ./app:/app
    environment:
      - FLASK_APP=app.py
      - FLASK_ENV=development
      - MYSQL_HOST=192.168.60.150
      - MYSQL_USER=user_92z0Kj
      - MYSQL_PASSWORD=5B3UXZV8vyrB
      - MYSQL_DATABASE=radius_NIaIuT
      - FLASK_SECRET_KEY=default-insecure-key
      - PYTHONPATH=/app
      - MACLOOKUP_RATE_LIMIT=2
      - MACLOOKUP_API_KEY=""  # if using a key later
      - MACLOOKUP_API_URL="https://api.maclookup.app/v2/macs/{}"
      - LOG_TO_FILE=true
      - LOG_FILE_PATH=/app/logs/app.log
    restart: no

  nginx:
    build:
      context: ./nginx
      dockerfile: Dockerfile
    ports:
      - "8080:80"
    depends_on:
      - app
    restart: always
