version: "3.8" services: app: build: . ports: - "8000:80" volumes: - .:/usr/share/nginx/html api: build: ./api ports: - "3000:3000" volumes: - ./api:/usr/src/app # Mount the local ./api directory to /usr/src/app in the container