1
0
forked from baron/baron-sso

userfront dev모드 구동 모드 run으로 변경

This commit is contained in:
2026-05-20 11:37:02 +09:00
parent 0f61425bbf
commit 0031784c07
6 changed files with 70 additions and 8 deletions

View File

@@ -1,3 +1,14 @@
FROM ghcr.io/cirruslabs/flutter:3.38.0 AS dev
ENV RUN_FLUTTER_AS_ROOT=true
WORKDIR /workspace
COPY scripts ./scripts
COPY locales ./locales
COPY userfront ./userfront
WORKDIR /workspace/userfront
RUN flutter pub get
EXPOSE 5000
CMD ["sh", "./scripts/dev-server.sh"]
# Stage 1: Build Flutter
FROM ghcr.io/cirruslabs/flutter:3.38.0 AS build
ENV RUN_FLUTTER_AS_ROOT=true
@@ -16,7 +27,7 @@ COPY userfront/scripts/optimize-web-build.mjs /work/scripts/optimize-web-build.m
RUN node /work/scripts/optimize-web-build.mjs /work/build/web
# Stage 2: Serve with Nginx
FROM alpine:3.23
FROM alpine:3.23 AS production
RUN apk add --no-cache nginx nginx-mod-http-brotli
# Copy built assets
COPY --from=optimize /work/build/web /usr/share/nginx/html

View File

@@ -0,0 +1,14 @@
#!/usr/bin/env sh
set -eu
cd /workspace
/bin/sh ./scripts/sync_userfront_locales.sh
cd /workspace/userfront
exec flutter run \
-d web-server \
--web-hostname 0.0.0.0 \
--web-port "${USERFRONT_INTERNAL_PORT:-5000}" \
--wasm \
--debug \
--no-web-resources-cdn