version: '3.8'

services:
  frontend:
    build:
      context: ./frontend
      dockerfile: Dockerfile
    ports:
      - "8080:8080"
    container_name: attribution_app_frontend
    environment:
      # Backend URL for API proxying - uses Docker internal networking
      - BACKEND_URL=http://backend:5002
    depends_on:
      - backend

  backend:
    build:
      context: ./backend
      dockerfile: Dockerfile
    ports:
      - "5002:5002"
    container_name: attribution_app_backend
    environment:
      # Pass the GCP_PROJECT_ID to the backend container
      # Create a .env file in this directory with GCP_PROJECT_ID=your-project-id
      - GCP_PROJECT_ID=${GCP_PROJECT_ID} 