WSL 도커 전환과 trixie-slim 로컬 실행 복구 반영

This commit is contained in:
2026-06-11 13:06:17 +09:00
parent c1a1fcb041
commit 2040234229
13 changed files with 264 additions and 23 deletions

View File

@@ -20,19 +20,21 @@ WORKDIR /app/userfront
RUN flutter pub get
RUN rm -rf build/web && flutter build web --release --wasm
FROM node:24-alpine AS optimize
FROM node:24-trixie-slim AS optimize
WORKDIR /work
COPY --from=build /app/userfront/build/web /work/build/web
COPY userfront/scripts/optimize-web-build.mjs /work/scripts/optimize-web-build.mjs
RUN node /work/scripts/optimize-web-build.mjs /work/build/web
# Stage 2: Serve with Nginx
FROM alpine:3.23 AS production
RUN apk add --no-cache nginx nginx-mod-http-brotli
FROM debian:trixie-slim AS production
RUN apt-get update \
&& apt-get install -y --no-install-recommends nginx ca-certificates wget \
&& rm -rf /var/lib/apt/lists/*
# Copy built assets
COPY --from=optimize /work/build/web /usr/share/nginx/html
# Copy custom Nginx config
COPY userfront/nginx.conf /etc/nginx/http.d/default.conf
COPY userfront/nginx.conf /etc/nginx/conf.d/default.conf
EXPOSE 5000
CMD ["nginx", "-g", "daemon off;"]