nginx.conf was hard-capped at 5M, causing 413 on uploads larger than 5MB despite the backend accepting up to MAX_FILE_SIZE_MB (default 50). Both nginx configs become envsubst templates. NGINX_MAX_BODY_SIZE defaults to 200M so the backend application limit is always the effective arbiter. gettext-base added to the single-image apt deps to provide envsubst.
16 lines
282 B
Docker
16 lines
282 B
Docker
FROM node:20-alpine AS build
|
|
|
|
WORKDIR /app
|
|
COPY package*.json ./
|
|
RUN npm ci
|
|
COPY . .
|
|
RUN npm run build
|
|
|
|
FROM nginx:alpine
|
|
|
|
COPY --from=build /app/dist /usr/share/nginx/html
|
|
COPY nginx.conf.template /etc/nginx/templates/default.conf.template
|
|
|
|
ENV NGINX_MAX_BODY_SIZE=200M
|
|
|
|
EXPOSE 80
|