Skip to content

Commit

Permalink
do not enable reload when deploying to fly.io
Browse files Browse the repository at this point in the history
  • Loading branch information
rodja committed Oct 16, 2023
1 parent c34c854 commit 652f3ac
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions fly.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,7 @@ COPY fly-entrypoint.sh /entrypoint.sh

ENTRYPOINT ["/entrypoint.sh"]

ENV PYTHONUNBUFFERED=1
ENV NICEGUI_PRODUCTION=true

CMD ["python", "main.py"]
4 changes: 3 additions & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -447,4 +447,6 @@ def status():
return 'Ok'


ui.run(uvicorn_reload_includes='*.py, *.css, *.html', reconnect_timeout=3.0)
ui.run(uvicorn_reload_includes='*.py, *.css, *.html',
reload=not os.environ.get('NICEGUI_PRODUCTION').lower() == 'true',
reconnect_timeout=3.0)

0 comments on commit 652f3ac

Please sign in to comment.