services:
  backend:
    image: python:3.13
    working_dir: /app/backend
    volumes:
      - ./backend:/app/backend
    command: sh -c "pip install -r requirements.txt && python manage.py migrate && python manage.py runserver 0.0.0.0:8000"
    ports:
      - "8001:8000"
    networks:
      - app_network

  frontend:
    image: node:20
    working_dir: /app/frontend
    volumes:
      - ./frontend:/app/frontend
    command: sh -c "npm install && npm run dev"
    ports:
      - "3001:3000"
    networks:
      - app_network

networks:
  app_network:
    driver: bridge
