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:
Andrés Eduardo García Márquez 2026-01-08 11:53:28 -05:00
parent 4af01f1008
commit 3e66b63ac7
4 changed files with 22 additions and 8 deletions

View File

@ -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/Host/*.csproj Host/
# Restore dependencies
RUN dotnet restore Host/Host.csproj
# Restore dependencies for Alpine/musl
RUN dotnet restore Host/Host.csproj -r linux-musl-x64
# Copy source and build
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
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
COPY --from=build /app .

View File

@ -4,7 +4,7 @@ WORKDIR /app
# Copy package files for caching
COPY src/frontend/package*.json ./
RUN npm ci --silent
RUN npm ci
# Copy source and build
COPY src/frontend/ .

View File

@ -15,7 +15,7 @@ server {
# API proxy
location /graphql {
proxy_pass http://api:5000;
proxy_pass http://student-api:5000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
@ -24,7 +24,7 @@ server {
}
location /health {
proxy_pass http://api:5000;
proxy_pass http://student-api:5000;
}
# Cache static assets

View File

@ -12343,7 +12343,7 @@
"version": "6.0.6",
"resolved": "https://registry.npmjs.org/graphql-ws/-/graphql-ws-6.0.6.tgz",
"integrity": "sha512-zgfER9s+ftkGKUZgc0xbx8T7/HMO4AV5/YuYiFc+AtgcO5T0v8AxYYNQ+ltzuzDZgNkYJaFspm5MMYLjQzrkmw==",
"dev": true,
"devOptional": true,
"license": "MIT",
"engines": {
"node": ">=20"
@ -12440,6 +12440,17 @@
"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": {
"version": "9.0.2",
"resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-9.0.2.tgz",
@ -20114,7 +20125,7 @@
"version": "8.19.0",
"resolved": "https://registry.npmjs.org/ws/-/ws-8.19.0.tgz",
"integrity": "sha512-blAT2mjOEIi0ZzruJfIhb3nps74PRWTCz1IjglWEEpQl5XS/UNama6u2/rjFkDDouqr4L67ry+1aGIALViWjDg==",
"dev": true,
"devOptional": true,
"license": "MIT",
"engines": {
"node": ">=10.0.0"