version: '3.8'

services:
  frontend:
    build: ./frontend
    ports:
      - "3030:3000"
    environment:
      - REACT_APP_API_URL=http://localhost:5000
    networks:
      - app-network

  backend:
    build: ./backend
    ports:
      - "5000:5000"
    volumes:
      - ./database:/app/database
    environment:
      - DATABASE_PATH=/app/database/notes.db
    networks:
      - app-network

networks:
  app-network:
    driver: bridge
