Refactored compose file to assign same context to both services #63

Merged
khwezi merged 1 commits from garages3 into main 2026-09-14 10:02:01 +02:00
2 changed files with 8 additions and 8 deletions
+5 -5
View File
@@ -6,14 +6,14 @@ WORKDIR /app
# Enable corepack to use Yarn # Enable corepack to use Yarn
RUN corepack enable RUN corepack enable
# Copy dependency definitions from the subdirectory # Copy dependency definitions from the UI subdirectory into the container's /app folder
COPY package*.json yarn.lock* ./ COPY PostFundManagement.ConsoleUI/package*.json PostFundManagement.ConsoleUI/yarn.lock* ./
# Install dependencies via Yarn # Install dependencies via Yarn
RUN yarn install --frozen-lockfile || yarn install RUN yarn install --frozen-lockfile || yarn install
# Copy application source from the subdirectory # Copy application source from the UI subdirectory into the container's /app folder
COPY . . COPY PostFundManagement.ConsoleUI/ ./
# Build Vite application for production # Build Vite application for production
RUN yarn build RUN yarn build
@@ -38,4 +38,4 @@ EXPOSE 3000
# Set entrypoint and default command # Set entrypoint and default command
ENTRYPOINT ["/docker-entrypoint.sh"] ENTRYPOINT ["/docker-entrypoint.sh"]
CMD ["nginx", "-g", "daemon off;"] CMD ["nginx", "-g", "daemon off;"]
+3 -3
View File
@@ -3,7 +3,7 @@ services:
image: pfm-api image: pfm-api
build: build:
context: . context: .
dockerfile: PostFundManagement.Api/Dockerfile dockerfile: ./PostFundManagement.Api/Dockerfile
network: host network: host
container_name: pfm-api container_name: pfm-api
ports: ports:
@@ -57,8 +57,8 @@ services:
pfm-console: pfm-console:
image: pfm-console image: pfm-console
build: build:
context: ./PostFundManagement.ConsoleUI context: .
dockerfile: Dockerfile dockerfile: ./PostFundManagement.ConsoleUI/Dockerfile
container_name: pfm-console container_name: pfm-console
ports: ports:
- "8076:3000" - "8076:3000"