@@ -52,20 +52,33 @@ RUN --mount=type=cache,target=/root/.cache/uv \
5252
5353COPY ./src /app/src
5454
55+ RUN mkdir -p /app/static
56+
5557ARG VITE_AUTO_LOGIN=true
5658ENV VITE_AUTO_LOGIN=$VITE_AUTO_LOGIN
57-
58- COPY src/frontend /tmp/src/frontend
59- WORKDIR /tmp/src/frontend
60-
6159ARG VITE_CLERK_AUTH_ENABLED=false
6260ARG VITE_CLERK_PUBLISHABLE_KEY=""
6361ENV VITE_CLERK_AUTH_ENABLED=$VITE_CLERK_AUTH_ENABLED
6462ENV VITE_CLERK_PUBLISHABLE_KEY=$VITE_CLERK_PUBLISHABLE_KEY
6563
64+ COPY src/frontend-shell /tmp/src/frontend-shell
65+ WORKDIR /tmp/src/frontend-shell
66+
6667RUN --mount=type=cache,target=/root/.npm \
6768 npm ci \
6869 && ESBUILD_BINARY_PATH="" NODE_OPTIONS="--max-old-space-size=12288" JOBS=1 npm run build \
70+ && mkdir -p /app/static/frontend-shell \
71+ && cp -r build/. /app/static/frontend-shell/ \
72+ && rm -rf /tmp/src/frontend-shell
73+
74+ COPY src/frontend /tmp/src/frontend
75+ WORKDIR /tmp/src/frontend
76+
77+ RUN --mount=type=cache,target=/root/.npm \
78+ npm ci \
79+ && ESBUILD_BINARY_PATH="" NODE_OPTIONS="--max-old-space-size=12288" JOBS=1 npm run build \
80+ && mkdir -p /app/static/frontend-app \
81+ && cp -r build/. /app/static/frontend-app/ \
6982 && cp -r build /app/src/backend/langflow/frontend \
7083 && rm -rf /tmp/src/frontend
7184
@@ -83,7 +96,7 @@ FROM python:3.12.3-slim AS runtime
8396
8497RUN apt-get update \
8598 && apt-get upgrade -y \
86- && apt-get install -y curl git libpq5 gnupg \
99+ && apt-get install -y curl git libpq5 gnupg nginx supervisor \
87100 && curl -fsSL https://deb.nodesource.com/setup_18.x | bash - \
88101 && apt-get install -y nodejs \
89102 && apt-get clean \
@@ -92,6 +105,17 @@ RUN apt-get update \
92105
93106COPY --from=builder --chown=1000 /app/.venv /app/.venv
94107
108+ RUN mkdir -p /app/docker
109+
110+ COPY --from=builder --chown=1000 /app/static /app/static
111+ COPY --from=builder --chown=1000 /app/src/backend/langflow/frontend /app/src/backend/langflow/frontend
112+ COPY docker/nginx/nginx.conf /etc/nginx/nginx.conf
113+ COPY docker/nginx/multi-frontend.conf /etc/nginx/conf.d/multi-frontend.conf
114+ COPY docker/supervisord.conf /app/docker/supervisord.conf
115+
116+ RUN rm -f /etc/nginx/conf.d/default.conf \
117+ && chown -R 1000:0 /app/docker /app/static
118+
95119# Place executables in the environment at the front of the path
96120ENV PATH="/app/.venv/bin:$PATH"
97121
@@ -107,5 +131,5 @@ WORKDIR /app
107131ENV LANGFLOW_HOST=0.0.0.0
108132ENV LANGFLOW_PORT=7860
109133
110- CMD ["langflow " , "run " ]
134+ CMD ["/usr/bin/supervisord " , "-c" , "/app/docker/supervisord.conf " ]
111135
0 commit comments