services:
  server:
    build:
      context: .
      dockerfile: server/Dockerfile
    ports:
      - "3000:3000"
    volumes:
      - ./server:/app/server
      - ./eventy.db:/app/eventy.db # Persist DB or mount existing one
    environment:
      - PORT=3000
    restart: unless-stopped

  client:
    build:
      context: ./client
      dockerfile: Dockerfile
    ports:
      - "5173:5173"
    volumes:
      - ./client:/app
    depends_on:
      - server
    environment:
      - VITE_API_URL=http://server:3000
    restart: unless-stopped
