Update for dns changes
This commit is contained in:
+6
-1
@@ -6,7 +6,12 @@ IMAGE_TAG=v1.0.0
|
|||||||
API_PORT=5270
|
API_PORT=5270
|
||||||
GATEWAY_PORT=5081
|
GATEWAY_PORT=5081
|
||||||
DASHBOARD_PORT=8088
|
DASHBOARD_PORT=8088
|
||||||
DASHBOARD_ORIGIN=https://vigilcare.example.com
|
DASHBOARD_ORIGIN=https://vigilcare-clinical.vectur45.com
|
||||||
|
# Set Gitea Actions variable PROD_API_URL to the public API origin (baked into
|
||||||
|
# the dashboard image at build). Example:
|
||||||
|
# PROD_API_URL=https://api.vigilcare-clinical.vectur45.com
|
||||||
|
# Gateway public host (nginx only; compose keeps CentralApi on the Docker network):
|
||||||
|
# https://gateway.vigilcare-clinical.vectur45.com
|
||||||
|
|
||||||
# ---- external PostgreSQL ----
|
# ---- external PostgreSQL ----
|
||||||
# Runtime (DML-only) connection used by the API container.
|
# Runtime (DML-only) connection used by the API container.
|
||||||
|
|||||||
@@ -3,7 +3,8 @@
|
|||||||
#
|
#
|
||||||
# Secrets: REGISTRY_USERNAME, REGISTRY_TOKEN, PG_CONNECTION_DDL,
|
# Secrets: REGISTRY_USERNAME, REGISTRY_TOKEN, PG_CONNECTION_DDL,
|
||||||
# DEPLOY_HOST, DEPLOY_USER, DEPLOY_SSH_KEY
|
# DEPLOY_HOST, DEPLOY_USER, DEPLOY_SSH_KEY
|
||||||
# Variables: PROD_API_URL, REGISTRY (optional; defaults below)
|
# Variables: PROD_API_URL (e.g. https://api.vigilcare-clinical.vectur45.com),
|
||||||
|
# REGISTRY (optional; defaults below)
|
||||||
name: CD
|
name: CD
|
||||||
|
|
||||||
on:
|
on:
|
||||||
|
|||||||
@@ -80,8 +80,10 @@ try
|
|||||||
builder.Services.AddControllers()
|
builder.Services.AddControllers()
|
||||||
.AddJsonOptions(o => o.JsonSerializerOptions.Converters.Add(new JsonStringEnumConverter()));
|
.AddJsonOptions(o => o.JsonSerializerOptions.Converters.Add(new JsonStringEnumConverter()));
|
||||||
|
|
||||||
|
var corsOrigins = builder.Configuration.GetSection("Dashboard:CorsOrigins").Get<string[]>()
|
||||||
|
?? ["http://localhost:5173"];
|
||||||
builder.Services.AddCors(o => o.AddPolicy("Dashboard", p =>
|
builder.Services.AddCors(o => o.AddPolicy("Dashboard", p =>
|
||||||
p.WithOrigins("http://localhost:5173").AllowAnyHeader().AllowAnyMethod()));
|
p.WithOrigins(corsOrigins).AllowAnyHeader().AllowAnyMethod()));
|
||||||
// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle
|
// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle
|
||||||
builder.Services.AddEndpointsApiExplorer();
|
builder.Services.AddEndpointsApiExplorer();
|
||||||
builder.Services.AddSwaggerGen();
|
builder.Services.AddSwaggerGen();
|
||||||
|
|||||||
@@ -16,6 +16,9 @@
|
|||||||
"CentralApi": {
|
"CentralApi": {
|
||||||
"BaseUrl": "http://localhost:5270"
|
"BaseUrl": "http://localhost:5270"
|
||||||
},
|
},
|
||||||
|
"Dashboard": {
|
||||||
|
"CorsOrigins": [ "http://localhost:5173" ]
|
||||||
|
},
|
||||||
"Gateway": {
|
"Gateway": {
|
||||||
"GatewayId": "22222222-2222-2222-2222-222222222222",
|
"GatewayId": "22222222-2222-2222-2222-222222222222",
|
||||||
"SiteId": "11111111-1111-1111-1111-111111111111",
|
"SiteId": "11111111-1111-1111-1111-111111111111",
|
||||||
|
|||||||
@@ -89,6 +89,7 @@ services:
|
|||||||
Gateway__SiteId: "${GATEWAY_SITE_ID}"
|
Gateway__SiteId: "${GATEWAY_SITE_ID}"
|
||||||
Gateway__Department: "${GATEWAY_DEPARTMENT:-ICU}"
|
Gateway__Department: "${GATEWAY_DEPARTMENT:-ICU}"
|
||||||
ApiKey__Gateway: "${GATEWAY_API_KEY}"
|
ApiKey__Gateway: "${GATEWAY_API_KEY}"
|
||||||
|
Dashboard__CorsOrigins__0: "${DASHBOARD_ORIGIN}"
|
||||||
Jwt__SigningKey: "${GATEWAY_JWT_SIGNING_KEY}"
|
Jwt__SigningKey: "${GATEWAY_JWT_SIGNING_KEY}"
|
||||||
Jwt__Issuer: "${GATEWAY_JWT_ISSUER:-vigilcare-gateway}"
|
Jwt__Issuer: "${GATEWAY_JWT_ISSUER:-vigilcare-gateway}"
|
||||||
Jwt__Audience: "${GATEWAY_JWT_AUDIENCE:-vigilcare-dashboard}"
|
Jwt__Audience: "${GATEWAY_JWT_AUDIENCE:-vigilcare-dashboard}"
|
||||||
|
|||||||
@@ -17,5 +17,5 @@ COPY --from=build /src/dist /usr/share/nginx/html
|
|||||||
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
||||||
EXPOSE 80
|
EXPOSE 80
|
||||||
|
|
||||||
HEALTHCHECK --interval=30s --timeout=3s --retries=3 \
|
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
|
||||||
CMD wget -qO- http://localhost/ >/dev/null || exit 1
|
CMD wget -qO- http://127.0.0.1/ >/dev/null || exit 1
|
||||||
@@ -1,5 +1,10 @@
|
|||||||
server {
|
server {
|
||||||
listen 80;
|
listen 80;
|
||||||
|
# Required explicitly: the nginx image's 10-listen-on-ipv6-by-default.sh
|
||||||
|
# only patches the stock default.conf. We replace that file, so without
|
||||||
|
# this line the container listens on IPv4 only while HEALTHCHECK wget
|
||||||
|
# resolves localhost to ::1 and fails → Docker reports unhealthy.
|
||||||
|
listen [::]:80;
|
||||||
server_name _;
|
server_name _;
|
||||||
root /usr/share/nginx/html;
|
root /usr/share/nginx/html;
|
||||||
index index.html;
|
index index.html;
|
||||||
|
|||||||
Reference in New Issue
Block a user