Refactored compose file to assign same context to both services

This commit is contained in:
2026-09-14 10:01:19 +02:00
parent 5bdd2a5786
commit bccdab2ba8
2 changed files with 8 additions and 8 deletions
+5 -5
View File
@@ -6,14 +6,14 @@ WORKDIR /app
# Enable corepack to use Yarn
RUN corepack enable
# Copy dependency definitions from the subdirectory
COPY package*.json yarn.lock* ./
# Copy dependency definitions from the UI subdirectory into the container's /app folder
COPY PostFundManagement.ConsoleUI/package*.json PostFundManagement.ConsoleUI/yarn.lock* ./
# Install dependencies via Yarn
RUN yarn install --frozen-lockfile || yarn install
# Copy application source from the subdirectory
COPY . .
# Copy application source from the UI subdirectory into the container's /app folder
COPY PostFundManagement.ConsoleUI/ ./
# Build Vite application for production
RUN yarn build
@@ -38,4 +38,4 @@ EXPOSE 3000
# Set entrypoint and default command
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
build:
context: .
dockerfile: PostFundManagement.Api/Dockerfile
dockerfile: ./PostFundManagement.Api/Dockerfile
network: host
container_name: pfm-api
ports:
@@ -57,8 +57,8 @@ services:
pfm-console:
image: pfm-console
build:
context: ./PostFundManagement.ConsoleUI
dockerfile: Dockerfile
context: .
dockerfile: ./PostFundManagement.ConsoleUI/Dockerfile
container_name: pfm-console
ports:
- "8076:3000"