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