version: '3.8' services: # The backend service for your AI Hub ai-hub: build: ./ai-hub container_name: ai_hub_service restart: unless-stopped env_file: - ai-hub/.env.prod volumes: # Mount the named volume to the /app/data directory in the container - ai_hub_data:/app/data:rw ports: # Expose the AI Hub's port - "8002:8000" # The frontend service for your React application, served by Nginx ai-ui: # Use a build context to find the React app's Dockerfile # This assumes your React project is in a subdirectory named 'react-app' build: ./ui/client-app container_name: ai_frontend_service restart: unless-stopped env_file: - ui/client-app/.env.prod ports: # Map host port 8080 to container port 80 (Nginx default) # This avoids a port conflict with the AI hub - "8003:443" # Define the named volume for the AI hub's data volumes: ai_hub_data: driver: local driver_opts: type: "nfs" # IMPORTANT: Replace the IP address below with your NFS server's actual IP o: "addr=192.168.68.90,rw" # IMPORTANT: Replace this path with the correct directory on your NFS server device: ":/volume1/docker/ai-hub/data"