From 79a8588181546aae28427fd3ef95d92a2db8e05a Mon Sep 17 00:00:00 2001 From: Jim Hodapp Date: Mon, 2 Dec 2024 21:43:02 -0600 Subject: [PATCH] Adds a new docker-compose service for our Next.js frontend application. docker-compose build && docker-compose up will now start a complete application in 3 different containers --- docker-compose.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docker-compose.yaml b/docker-compose.yaml index e1a400c..df06552 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -42,6 +42,16 @@ services: networks: - backend_network # Connect to backend_network command: ["sh", "-c", "sleep 5 && /usr/local/bin/refactor_platform_rs"] # Wait for Postgres and run the app + + nextjs-app: + build: + context: https://github.com/refactor-group/refactor-platform-fe.git # change to fs directory to run locally + dockerfile: Dockerfile + target: runner # Use runner target + ports: + - "${NEXTJS_FRONTEND_PORT}:${NEXTJS_FRONTEND_PORT}" # Map host port to frontend container's service port + depends_on: + - rust-app # Ensure postgres service starts before rust-app networks: backend_network: