WSL 도커 전환과 trixie-slim 로컬 실행 복구 반영
This commit is contained in:
@@ -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;"]
|
||||
|
||||
@@ -30,9 +30,7 @@ server {
|
||||
application/javascript mjs;
|
||||
}
|
||||
etag on;
|
||||
brotli off;
|
||||
brotli_static on;
|
||||
|
||||
|
||||
error_log /dev/stderr warn;
|
||||
access_log /var/log/nginx/access.log json_combined;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user