Compare commits
28
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
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 =>
|
||||
policy.WithOrigins("https://localhost:3000", "https://localhost:8076", "https://console.ifri.khongisa.co.za")
|
||||
.AllowAnyHeader()
|
||||
.AllowAnyMethod()
|
||||
.AllowCredentials()));
|
||||
policy.AllowAnyOrigin().AllowAnyHeader().AllowAnyMethod().AllowCredentials()));
|
||||
|
||||
var app = builder.Build();
|
||||
|
||||
|
||||
@@ -3,34 +3,29 @@ FROM node:20-alpine AS builder
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Enable corepack to use Yarn
|
||||
RUN corepack enable
|
||||
# Copy dependency definitions
|
||||
COPY package*.json ./
|
||||
|
||||
# Copy dependency definitions from the subdirectory
|
||||
COPY PostFundManagement.ConsoleUI/package*.json PostFundManagement.ConsoleUI/yarn.lock* ./
|
||||
# Install dependencies
|
||||
RUN npm ci || npm install
|
||||
|
||||
# Install dependencies via Yarn
|
||||
RUN yarn install --frozen-lockfile || yarn install
|
||||
|
||||
# Copy application source from the subdirectory
|
||||
COPY PostFundManagement.ConsoleUI/ ./
|
||||
# Copy application source
|
||||
COPY . .
|
||||
|
||||
# Build Vite application for production
|
||||
RUN yarn build
|
||||
RUN npm run build
|
||||
|
||||
# Stage 2: Production Nginx Server
|
||||
FROM nginx:alpine
|
||||
|
||||
WORKDIR /usr/share/nginx/html
|
||||
|
||||
# Copy nginx configuration from stage 1 build directory
|
||||
COPY --from=builder /app/nginx.conf /etc/nginx/conf.d/default.conf
|
||||
# Copy nginx configuration
|
||||
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
||||
|
||||
# Copy compiled static assets from build stage
|
||||
COPY --from=builder /app/dist ./
|
||||
COPY --from=builder /app/dist /usr/share/nginx/html
|
||||
|
||||
# Copy entrypoint script for dynamic runtime environment variables
|
||||
COPY --from=builder /app/docker-entrypoint.sh /docker-entrypoint.sh
|
||||
COPY docker-entrypoint.sh /docker-entrypoint.sh
|
||||
RUN chmod +x /docker-entrypoint.sh
|
||||
|
||||
# Expose port 3000
|
||||
@@ -38,4 +33,4 @@ EXPOSE 3000
|
||||
|
||||
# Set entrypoint and default command
|
||||
ENTRYPOINT ["/docker-entrypoint.sh"]
|
||||
CMD ["nginx", "-g", "daemon off;"]
|
||||
CMD ["nginx", "-g", "daemon off;"]
|
||||
|
||||
@@ -7,13 +7,13 @@ services:
|
||||
dockerfile: Dockerfile
|
||||
container_name: pfm-console
|
||||
ports:
|
||||
- "8076:3000"
|
||||
- "3000:3000"
|
||||
environment:
|
||||
# OIDC Identity Provider Configuration
|
||||
- OIDC_AUTHORITY=${OIDC_AUTHORITY}
|
||||
- OIDC_AUDIENCE=${OIDC_AUDIENCE}
|
||||
- OIDC_CLIENT_ID=${OIDC_CLIENT_ID}
|
||||
- OIDC_CLIENT_SECRET=${OIDC_CLIENT_SECRET}
|
||||
- OIDC_AUTHORITY=https://sts.security.khongisa.co.za
|
||||
- OIDC_AUDIENCE=pfm-api-dev
|
||||
- OIDC_CLIENT_ID=pfm-scalar-dev
|
||||
- OIDC_CLIENT_SECRET=secret_71f88570a46eb22eb5270b47f69e3332c84d8db85d008f0276cb7431c8872d27
|
||||
# Backend API Configuration
|
||||
- API_BASE_URL=${API_BASE_URL}
|
||||
- API_BASE_URL=https://api.ifri.khongisa.co.za/
|
||||
restart: unless-stopped
|
||||
|
||||
+1
-18
@@ -66,21 +66,4 @@ services:
|
||||
- Email__SmtpPort=${EMAIL_SMTP_PORT:-587}
|
||||
|
||||
# Redis overrides
|
||||
- ConnectionStrings__Redis=${REDIS_CONNECTION_STRING:-192.168.1.171:6379,ssl=false,abortConnect=false}
|
||||
pfm-console:
|
||||
image: pfm-console
|
||||
build:
|
||||
context: .
|
||||
dockerfile: PostFundManagement.ConsoleUI/Dockerfile
|
||||
container_name: pfm-console
|
||||
ports:
|
||||
- "8076:3000"
|
||||
environment:
|
||||
# OIDC Identity Provider Configuration
|
||||
- OIDC_AUTHORITY=${OIDC_AUTHORITY:-https://}
|
||||
- OIDC_AUDIENCE=${OIDC_AUDIENCE:-aud}
|
||||
- OIDC_CLIENT_ID=${OIDC_CLIENT_ID:-clientid}
|
||||
- OIDC_CLIENT_SECRET=${OIDC_CLIENT_SECRET:-yoursecret}
|
||||
# Backend API Configuration
|
||||
- API_BASE_URL=${API_BASE_URL:-https://api.ifri.khongisa.co.za/}
|
||||
restart: unless-stopped
|
||||
- ConnectionStrings__Redis=${REDIS_CONNECTION_STRING:-192.168.1.171:6379,ssl=false,abortConnect=false}
|
||||
Reference in New Issue
Block a user