Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

shiny-server not watching for file changes in Python app. #573

Open
avhz opened this issue Jul 26, 2024 · 1 comment
Open

shiny-server not watching for file changes in Python app. #573

avhz opened this issue Jul 26, 2024 · 1 comment

Comments

@avhz
Copy link

avhz commented Jul 26, 2024

I have a Python Shiny app on a company server running via shiny-server. When I make changes to it, the changes are not reflected in the browser at the URL (changes are picked up for R Shiny apps though).

A workaround is to just rename the directory of the app, and rename it back, then shiny-server picks it up as 'new' app.

Is there a fix for this ?

Secondary question:

How can I get shiny-server to use my .venv for this specific app ?

Currently it uses system-wide (Ubuntu) Python packages, but this means I have to get IT to install every dependency for me.

Furthermore, it means we cannot have multiple apps requiring different versions of dependencies.

@DvGils
Copy link

DvGils commented Sep 18, 2024

To answer your second question: You can specify a relative path where you want shiny to look for a python environment in your /etc/shiny-server/shiny-server.conf file.

You could, for instance, add python ./.venv/; at the top of the configuration file, telling shiny to look for a virtual environment at the root of an application directory.

More info: https://shiny.posit.co/py/docs/deploy-on-prem.html#deploy-to-shiny-server-open-source:~:text=Edit%20the%20file-,/etc/shiny%2Dserver/shiny%2Dserver.conf,-(root%20privileges%20are

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants