Skip to content

R Shiny app to visualize beehive measurement data.

License

Notifications You must be signed in to change notification settings

JavanXD/shiny-beehive

Repository files navigation

shiny-beehive

R Shiny app to visualize beehive measurement data.

Checkout latest code

git clone https://github.com/JavanXD/shiny-beehive shiny-beehive
cd shiny-beehive

Screenshots

Screenshot from Shiny App - Zeitreihe Screenshot from Shiny App - Gewichtsanalyse Screenshot from Shiny App - Dashboard


Run Docker

Build the docker image

Building the Docker Image is straightforward. Make sure you are in the shiny-beehive directory with the Terminal and type in:

docker build -t shiny-beehive .

Don't forget to make shiny-server.sh on your local machine executable. The permissions are copied from your local machine.

chmod 755 shiny-server.sh

Run the docker image with your ShinyApp

When this process is done, you can run your ShinyApp in Docker 🎉

docker run -p 3838:3838 --name shiny_beehive shiny-beehive

Now, you can open the app with any browser by visiting http://localhost:3838

To save your Docker Image as a tar-archive, you simply type into your terminal:

docker save -o ./shiny_beehive-latest.tar shiny-beehive:latest

This file can be for example uploaded to your Plesk Onyx Docker Manager.

Upload to Docker Hub:

# Frist create repository at Docker Hub
# Log into the Docker Hub from the command line
docker login --username=javanxd
# tag your image
docker images
docker tag 3d06871c1017 javanxd/shiny-beehive:firsttry
# Push your image to the repository you created
docker push javanxd/shiny-beehive

Helpful links

Nginx config

After moving cloudflare proxy in front the websocket connection received a 400 Bad Request. Deploying the following rules worked:

location ^~ /__sockjs__/ {

	proxy_set_header Upgrade $http_upgrade;
	proxy_set_header Connection "upgrade";
	proxy_set_header Host $http_host;
	proxy_set_header X-Real-IP $remote_addr;
	proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

	proxy_pass http://localhost:32769;
}