1
0
forked from baron/baron-sso
Files
baron-sso/userfront/Dockerfile
2026-02-12 21:53:42 +09:00

22 lines
592 B
Docker

# Stage 1: Build Flutter
FROM ghcr.io/cirruslabs/flutter:3.38.0 AS build
ENV RUN_FLUTTER_AS_ROOT=true
WORKDIR /app
COPY . .
# Get dependencies and build for web
RUN /bin/sh ./scripts/sync_userfront_locales.sh
WORKDIR /app/userfront
RUN flutter pub get
RUN touch .env
RUN flutter build web --wasm --release --no-tree-shake-icons
# Stage 2: Serve with Nginx
FROM nginx:alpine
# Copy built assets
COPY --from=build /app/userfront/build/web /usr/share/nginx/html
# Copy custom Nginx config
COPY userfront/nginx.conf /etc/nginx/conf.d/default.conf
EXPOSE 5000
CMD ["nginx", "-g", "daemon off;"]