Compare commits
8
Commits
bd7ca9372f
...
endpoints
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ea0e4eb018 | ||
|
|
9ebbafb840 | ||
|
|
f3863c785d | ||
|
|
9874eac65d | ||
|
|
2b8edd05e3 | ||
|
|
edbae6defb | ||
|
|
b3e884336d | ||
|
|
1b0ceb8ea9 |
@@ -92,7 +92,10 @@ builder.Services.AddOpenApi(options =>
|
||||
});
|
||||
|
||||
builder.Services.AddCors(options => options.AddPolicy("AllowFrontend", policy =>
|
||||
policy.WithOrigins("https://localhost:3000").AllowAnyHeader().AllowAnyMethod().AllowCredentials()));
|
||||
policy.WithOrigins("https://localhost:3000", "https://localhost:8076", "https://console.ifri.khongisa.co.za")
|
||||
.AllowAnyHeader()
|
||||
.AllowAnyMethod()
|
||||
.AllowCredentials()));
|
||||
|
||||
var app = builder.Build();
|
||||
|
||||
|
||||
@@ -3,29 +3,34 @@ FROM node:20-alpine AS builder
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Copy dependency definitions
|
||||
COPY package*.json ./
|
||||
# Enable corepack to use Yarn
|
||||
RUN corepack enable
|
||||
|
||||
# Install dependencies
|
||||
RUN npm ci || npm install
|
||||
# Copy dependency definitions from the subdirectory
|
||||
COPY PostFundManagement.ConsoleUI/package*.json PostFundManagement.ConsoleUI/yarn.lock* ./
|
||||
|
||||
# Copy application source
|
||||
COPY . .
|
||||
# Install dependencies via Yarn
|
||||
RUN yarn install --frozen-lockfile || yarn install
|
||||
|
||||
# Copy application source from the subdirectory
|
||||
COPY PostFundManagement.ConsoleUI/ ./
|
||||
|
||||
# Build Vite application for production
|
||||
RUN npm run build
|
||||
RUN yarn build
|
||||
|
||||
# Stage 2: Production Nginx Server
|
||||
FROM nginx:alpine
|
||||
|
||||
# Copy nginx configuration
|
||||
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
||||
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 compiled static assets from build stage
|
||||
COPY --from=builder /app/dist /usr/share/nginx/html
|
||||
COPY --from=builder /app/dist ./
|
||||
|
||||
# Copy entrypoint script for dynamic runtime environment variables
|
||||
COPY docker-entrypoint.sh /docker-entrypoint.sh
|
||||
COPY --from=builder /app/docker-entrypoint.sh /docker-entrypoint.sh
|
||||
RUN chmod +x /docker-entrypoint.sh
|
||||
|
||||
# Expose port 3000
|
||||
|
||||
@@ -7,13 +7,13 @@ services:
|
||||
dockerfile: Dockerfile
|
||||
container_name: pfm-console
|
||||
ports:
|
||||
- "3000:3000"
|
||||
- "8076:3000"
|
||||
environment:
|
||||
# OIDC Identity Provider Configuration
|
||||
- OIDC_AUTHORITY=https://sts.security.khongisa.co.za
|
||||
- OIDC_AUDIENCE=pfm-api-dev
|
||||
- OIDC_CLIENT_ID=pfm-scalar-dev
|
||||
- OIDC_CLIENT_SECRET=secret_71f88570a46eb22eb5270b47f69e3332c84d8db85d008f0276cb7431c8872d27
|
||||
- OIDC_AUTHORITY=${OIDC_AUTHORITY}
|
||||
- OIDC_AUDIENCE=${OIDC_AUDIENCE}
|
||||
- OIDC_CLIENT_ID=${OIDC_CLIENT_ID}
|
||||
- OIDC_CLIENT_SECRET=${OIDC_CLIENT_SECRET}
|
||||
# Backend API Configuration
|
||||
- API_BASE_URL=https://api.ifri.khongisa.co.za/
|
||||
- API_BASE_URL=${API_BASE_URL}
|
||||
restart: unless-stopped
|
||||
|
||||
@@ -67,3 +67,20 @@ services:
|
||||
|
||||
# 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
|
||||
Reference in New Issue
Block a user