Compare commits
34
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0dc0de1502 | ||
|
|
de47dd4a4f | ||
|
|
2810cc669b | ||
|
|
734af8c86f | ||
|
|
a754c42d14 | ||
|
|
bd7ca9372f | ||
|
|
0d01d91ab4 | ||
|
|
2c817a8818 | ||
|
|
4c3a96917b | ||
|
|
e5c3a75795 | ||
|
|
1bc7e65960 | ||
|
|
094126d84b | ||
|
|
2506241a25 | ||
|
|
cfe3530639 | ||
|
|
985557bee4 | ||
|
|
f0b8b3051a | ||
|
|
6c88b9e533 | ||
|
|
7d67408d2c | ||
|
|
d1d58a6183 | ||
|
|
60ad154841 | ||
|
|
2c13170859 | ||
|
|
d87c8aa3c9 | ||
|
|
6af7815ad1 | ||
|
|
a169f6c3f6 | ||
|
|
65ea753c19 | ||
|
|
e6d2663265 | ||
|
|
91b5814b60 | ||
|
|
0c4c848568 | ||
|
|
fb05150ebf | ||
|
|
2f9c20020b | ||
|
|
a771957db3 | ||
|
|
46267a2a34 | ||
|
|
a7f360cc2a | ||
|
|
67c08b40ca |
@@ -92,10 +92,7 @@ builder.Services.AddOpenApi(options =>
|
|||||||
});
|
});
|
||||||
|
|
||||||
builder.Services.AddCors(options => options.AddPolicy("AllowFrontend", policy =>
|
builder.Services.AddCors(options => options.AddPolicy("AllowFrontend", policy =>
|
||||||
policy.WithOrigins("https://localhost:3000", "https://localhost:8076", "https://console.ifri.khongisa.co.za")
|
policy.WithOrigins("https://localhost:3000").AllowAnyHeader().AllowAnyMethod().AllowCredentials()));
|
||||||
.AllowAnyHeader()
|
|
||||||
.AllowAnyMethod()
|
|
||||||
.AllowCredentials()));
|
|
||||||
|
|
||||||
var app = builder.Build();
|
var app = builder.Build();
|
||||||
|
|
||||||
|
|||||||
@@ -3,39 +3,34 @@ FROM node:20-alpine AS builder
|
|||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
# Enable corepack to use Yarn
|
# Copy dependency definitions
|
||||||
RUN corepack enable
|
COPY PostFundManagement.ConsoleUI/package*.json ./
|
||||||
|
|
||||||
# Copy dependency definitions from the subdirectory
|
# Install dependencies
|
||||||
COPY PostFundManagement.ConsoleUI/package*.json PostFundManagement.ConsoleUI/yarn.lock* ./
|
RUN npm ci || npm install
|
||||||
|
|
||||||
# Install dependencies via Yarn
|
# Copy application source
|
||||||
RUN yarn install --frozen-lockfile || yarn install
|
COPY PostFundManagement.ConsoleUI/ .
|
||||||
|
|
||||||
# Copy application source from the subdirectory
|
|
||||||
COPY PostFundManagement.ConsoleUI/ ./
|
|
||||||
|
|
||||||
# Build Vite application for production
|
# Build Vite application for production
|
||||||
RUN yarn build
|
RUN npm run build
|
||||||
|
|
||||||
# Stage 2: Production Nginx Server
|
# Stage 2: Production Nginx Server
|
||||||
FROM nginx:alpine
|
FROM nginx:alpine
|
||||||
|
|
||||||
WORKDIR /usr/share/nginx/html
|
# Copy nginx configuration
|
||||||
|
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
||||||
# Copy nginx configuration from stage 1 build directory
|
|
||||||
COPY --from=builder /app/nginx.conf /etc/nginx/conf.d/default.conf
|
|
||||||
|
|
||||||
# Copy compiled static assets from build stage
|
# Copy compiled static assets from build stage
|
||||||
COPY --from=builder /app/dist ./
|
COPY --from=builder /app/PostFundManagement.ConsoleUI/dist /usr/share/nginx/html
|
||||||
|
|
||||||
# Copy entrypoint script for dynamic runtime environment variables
|
# Copy entrypoint script for dynamic runtime environment variables
|
||||||
COPY --from=builder /app/docker-entrypoint.sh /docker-entrypoint.sh
|
COPY docker-entrypoint.sh /app/PostFundManagement.ConsoleUI/docker-entrypoint.sh
|
||||||
RUN chmod +x /docker-entrypoint.sh
|
RUN chmod +x /app/PostFundManagement.ConsoleUI/docker-entrypoint.sh
|
||||||
|
|
||||||
# Expose port 3000
|
# Expose port 3000
|
||||||
EXPOSE 3000
|
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;"]
|
||||||
|
|||||||
@@ -68,7 +68,6 @@ services:
|
|||||||
# Redis overrides
|
# Redis overrides
|
||||||
- ConnectionStrings__Redis=${REDIS_CONNECTION_STRING:-192.168.1.171:6379,ssl=false,abortConnect=false}
|
- ConnectionStrings__Redis=${REDIS_CONNECTION_STRING:-192.168.1.171:6379,ssl=false,abortConnect=false}
|
||||||
pfm-console:
|
pfm-console:
|
||||||
image: pfm-console
|
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
dockerfile: PostFundManagement.ConsoleUI/Dockerfile
|
dockerfile: PostFundManagement.ConsoleUI/Dockerfile
|
||||||
|
|||||||
Reference in New Issue
Block a user