fix(docker): alpine compatibility and k3s deployment fixes
- Add linux-musl-x64 runtime identifier for Alpine builds - Install ICU libs for SQL Server globalization support - Fix nginx upstream to use k8s service name (student-api) - Sync package-lock.json with package.json
This commit is contained in:
parent
4af01f1008
commit
3e66b63ac7
|
|
@ -9,15 +9,18 @@ COPY src/backend/Adapters/Driven/Persistence/*.csproj Adapters/Driven/Persistenc
|
||||||
COPY src/backend/Adapters/Driving/Api/*.csproj Adapters/Driving/Api/
|
COPY src/backend/Adapters/Driving/Api/*.csproj Adapters/Driving/Api/
|
||||||
COPY src/backend/Host/*.csproj Host/
|
COPY src/backend/Host/*.csproj Host/
|
||||||
|
|
||||||
# Restore dependencies
|
# Restore dependencies for Alpine/musl
|
||||||
RUN dotnet restore Host/Host.csproj
|
RUN dotnet restore Host/Host.csproj -r linux-musl-x64
|
||||||
|
|
||||||
# Copy source and build
|
# Copy source and build
|
||||||
COPY src/backend/ .
|
COPY src/backend/ .
|
||||||
RUN dotnet publish Host/Host.csproj -c Release -o /app --no-restore
|
RUN dotnet publish Host/Host.csproj -c Release -o /app -r linux-musl-x64 --self-contained false
|
||||||
|
|
||||||
# Runtime image
|
# Runtime image
|
||||||
FROM mcr.microsoft.com/dotnet/aspnet:10.0-alpine AS runtime
|
FROM mcr.microsoft.com/dotnet/aspnet:10.0-alpine AS runtime
|
||||||
|
# Install ICU for SQL Server globalization support
|
||||||
|
RUN apk add --no-cache icu-libs
|
||||||
|
ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY --from=build /app .
|
COPY --from=build /app .
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ WORKDIR /app
|
||||||
|
|
||||||
# Copy package files for caching
|
# Copy package files for caching
|
||||||
COPY src/frontend/package*.json ./
|
COPY src/frontend/package*.json ./
|
||||||
RUN npm ci --silent
|
RUN npm ci
|
||||||
|
|
||||||
# Copy source and build
|
# Copy source and build
|
||||||
COPY src/frontend/ .
|
COPY src/frontend/ .
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ server {
|
||||||
|
|
||||||
# API proxy
|
# API proxy
|
||||||
location /graphql {
|
location /graphql {
|
||||||
proxy_pass http://api:5000;
|
proxy_pass http://student-api:5000;
|
||||||
proxy_http_version 1.1;
|
proxy_http_version 1.1;
|
||||||
proxy_set_header Upgrade $http_upgrade;
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
proxy_set_header Connection 'upgrade';
|
proxy_set_header Connection 'upgrade';
|
||||||
|
|
@ -24,7 +24,7 @@ server {
|
||||||
}
|
}
|
||||||
|
|
||||||
location /health {
|
location /health {
|
||||||
proxy_pass http://api:5000;
|
proxy_pass http://student-api:5000;
|
||||||
}
|
}
|
||||||
|
|
||||||
# Cache static assets
|
# Cache static assets
|
||||||
|
|
|
||||||
|
|
@ -12343,7 +12343,7 @@
|
||||||
"version": "6.0.6",
|
"version": "6.0.6",
|
||||||
"resolved": "https://registry.npmjs.org/graphql-ws/-/graphql-ws-6.0.6.tgz",
|
"resolved": "https://registry.npmjs.org/graphql-ws/-/graphql-ws-6.0.6.tgz",
|
||||||
"integrity": "sha512-zgfER9s+ftkGKUZgc0xbx8T7/HMO4AV5/YuYiFc+AtgcO5T0v8AxYYNQ+ltzuzDZgNkYJaFspm5MMYLjQzrkmw==",
|
"integrity": "sha512-zgfER9s+ftkGKUZgc0xbx8T7/HMO4AV5/YuYiFc+AtgcO5T0v8AxYYNQ+ltzuzDZgNkYJaFspm5MMYLjQzrkmw==",
|
||||||
"dev": true,
|
"devOptional": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=20"
|
"node": ">=20"
|
||||||
|
|
@ -12440,6 +12440,17 @@
|
||||||
"tslib": "^2.0.3"
|
"tslib": "^2.0.3"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/hono": {
|
||||||
|
"version": "4.11.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/hono/-/hono-4.11.3.tgz",
|
||||||
|
"integrity": "sha512-PmQi306+M/ct/m5s66Hrg+adPnkD5jiO6IjA7WhWw0gSBSo1EcRegwuI1deZ+wd5pzCGynCcn2DprnE4/yEV4w==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"peer": true,
|
||||||
|
"engines": {
|
||||||
|
"node": ">=16.9.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/hosted-git-info": {
|
"node_modules/hosted-git-info": {
|
||||||
"version": "9.0.2",
|
"version": "9.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-9.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-9.0.2.tgz",
|
||||||
|
|
@ -20114,7 +20125,7 @@
|
||||||
"version": "8.19.0",
|
"version": "8.19.0",
|
||||||
"resolved": "https://registry.npmjs.org/ws/-/ws-8.19.0.tgz",
|
"resolved": "https://registry.npmjs.org/ws/-/ws-8.19.0.tgz",
|
||||||
"integrity": "sha512-blAT2mjOEIi0ZzruJfIhb3nps74PRWTCz1IjglWEEpQl5XS/UNama6u2/rjFkDDouqr4L67ry+1aGIALViWjDg==",
|
"integrity": "sha512-blAT2mjOEIi0ZzruJfIhb3nps74PRWTCz1IjglWEEpQl5XS/UNama6u2/rjFkDDouqr4L67ry+1aGIALViWjDg==",
|
||||||
"dev": true,
|
"devOptional": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=10.0.0"
|
"node": ">=10.0.0"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue