Refactored compose file to assign same context to both services
This commit is contained in:
@@ -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
|
||||
|
||||
+3
-3
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user