Skip to content

Commit 283d2aa

Browse files
committed
docker-example: update .web/_static to .web/build/client
1 parent 7e96de2 commit 283d2aa

5 files changed

Lines changed: 9 additions & 9 deletions

File tree

docker-example/production-app-platform/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
# then copy the contents of `frontend.zip` to your static file server (github pages, s3, etc).
66
#
77
# Azure Static Web App example:
8-
# npx @azure/static-web-apps-cli deploy --env production --app-location .web/_static
8+
# npx @azure/static-web-apps-cli deploy --env production --app-location .web/build/client
99
#
1010
# For dynamic routes to function properly, ensure that 404s are redirected to /404 on the
1111
# static file host (for github pages, this works out of the box; remember to create .nojekyll).
1212
#
13-
# For azure static web apps, add `staticwebapp.config.json` to to `.web/_static` with the following:
13+
# For azure static web apps, add `staticwebapp.config.json` to to `.web/build/client` with the following:
1414
# {
1515
# "responseOverrides": {
1616
# "404": {
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
FROM library/caddy
22

3-
COPY --from=local/reflex-app /app/.web/_static /srv
3+
COPY --from=local/reflex-app /app/.web/build/client /srv
44
ADD Caddyfile /etc/caddy/Caddyfile

docker-example/production-compose/Dockerfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,13 @@ RUN $uv pip install -r requirements.txt
2626
# Deploy templates and prepare app
2727
RUN reflex init
2828

29-
# Export static copy of frontend to /app/.web/_static
29+
# Export static copy of frontend to /app/.web/build/client
3030
RUN reflex export --frontend-only --no-zip
3131

3232
# Copy static files out of /app to save space in backend image
33-
RUN mv .web/_static /tmp/_static
34-
RUN rm -rf .web && mkdir .web
35-
RUN mv /tmp/_static .web/_static
33+
RUN mv .web/build/client /tmp/client
34+
RUN rm -rf .web && mkdir -p .web/build
35+
RUN mv /tmp/client .web/build/client
3636

3737
# Stage 2: copy artifacts into slim image
3838
FROM python:3.13-slim

docker-example/production-one-port/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ COPY . .
3434

3535
ARG PORT API_URL
3636
# Download other npm dependencies and compile frontend
37-
RUN REFLEX_API_URL=${API_URL:-http://localhost:$PORT} reflex export --loglevel debug --frontend-only --no-zip && mv .web/_static/* /srv/ && rm -rf .web
37+
RUN REFLEX_API_URL=${API_URL:-http://localhost:$PORT} reflex export --loglevel debug --frontend-only --no-zip && mv .web/build/client/* /srv/ && rm -rf .web
3838

3939

4040
# Final image with only necessary files

docker-example/simple-one-port/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ RUN pip install -r requirements.txt
2727
RUN reflex init
2828

2929
# Download all npm dependencies and compile frontend
30-
RUN reflex export --frontend-only --no-zip && mv .web/_static/* /srv/ && rm -rf .web
30+
RUN reflex export --frontend-only --no-zip && mv .web/build/client/* /srv/ && rm -rf .web
3131

3232
# Needed until Reflex properly passes SIGTERM on backend.
3333
STOPSIGNAL SIGKILL

0 commit comments

Comments
 (0)