I am attempting to deploy my Dash app on a Linux server and have run into a few roadblocks. I am a student and have been struggling with this for several weeks, so am grateful for any guidance. Am posting here on the recommendation of @Emil.
I am using Dash for R, not the Python version (though I imagine the requirements for hosting are similar). I would like to host an informational website which displays several bioinformatics analyses. I can run my website locally and access it on my computer at http://127.0.0.1:8050/.
Within app.R
, I create the Dash app
object as follows:
app = Dash$new()
server = app$server
After defining the layout and several callbacks, I run the following at the end of app.R
to serve my website locally:
app$run_server()
Due to data use requirements, I must host this website on a VM running CentOS 7 (e.g., server.org
). Currently, the code for my website (i.e., app.R
and graphs/figures, subdirectories, etc.) is contained within a GitHub repository cloned on the VM at /var/www/html/<repository>
. I have installed the dependencies and opened port 8050 on the VM. When I run curl 127.0.0.1:8050
, I see the HTML code of my website.
I am unsure how to set up Gunicorn (and Docker, if needed?) to serve my website at server.org
.
From what I have read, I understand that I can use a systemd
service to run app.R
by creating a <repository>.service
file at /etc/systemd/system
. Is using a Docker container an alternative solution? Do I also need to use a web server (Gunicorn? Apache? Nginx?) to actually serve my website?
Thanks for your time.