services:
  backend:
    build: ./backend
    ports:
      - "8000:8000"
    volumes:
      - sqlite_data:/app/data
      - receipts_data:/app/uploads/receipts
    environment:
      - DATABASE_URL=sqlite:///./data/juntete.db
      - DEBUG=false
    command: uvicorn app.main:app --host 0.0.0.0 --port 8000
    networks:
      - juntete-network

  frontend:
    build: ./frontend
    ports:
      - "3000:3000"
    environment:
      - BACKEND_URL=http://backend:8000
      - NODE_ENV=production
    command: npm run start
    depends_on:
      - backend
    networks:
      - juntete-network

volumes:
  sqlite_data:
  receipts_data:

networks:
  juntete-network:
    driver: bridge