I have a VPS Linux (Ubuntu) server with specific IP and I would like to run my shiny app on my own domain http://my_domain.com. Therefore, I have built a docker container and I have run my app on the Ubuntu terminal:
sudo docker run -rm -p 4096:4096 my_app
It works well on the localhost. Then, I have modified the following lines in my Dockerfile:
EXPOSE 80
CMD ["R", "-e", "shiny::runApp('/srv/shiny-server/my_app/app', host = 'server_ip', port = 80)"]
I have built and run my docker container again and I have got the following error:
sudo docker run --rm -p 80:80 my_app
Listening on http://server_ip:80
createTcpServer: address not available
Error in initialize(...) : Failed to create server
Maybe I need to configure nginx. I would be grateful if someone could tell me what would be the best solution to run my app on my own domain and how to do it.
Docker container does not have access to server_ip, try this :
EXPOSE 80
CMD ["R", "-e", "shiny::runApp('/srv/shiny-server/my_app/app', host = '0.0.0.0', port = 80)"]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With