How to Update Docker Image for ShinyProxy

What I know:
ShinyProxy does not have to be restarted to update an app, it only has to be updated it changes to the configuration are made
Question 1:
However, do I have to update both the container and the image, or just the image?

Question 2:
When I make changes to the data in which the my app uses, how can I update the docker image or container(if necessary), so that the app will show and update on the ShinyProxy Server, without having to restart shinyproxy?
I have the current docker image running named: test/app1

My ShinyProxy configuration:

   - name: testapp1
    docker-image: test/app1
    groups: scientists

Here are my current steps:
_1. Rebuild the application using: docker build -t test/app1

_2.Restart Docker using: service docker restart

**After these steps are made there are no errors but the app does not display anything on ShinyProxy Server when it is clicked. Is this an issue with the Image update or Container.

Thanks.

1 Like

Hi @Babacar_Diouf,

Question 1: you only have to update the image; the next time someone starts a Shiny app on your ShinyProxy installation, the new image will be used to launch a container.

Question 2: you can either update data inside the image and rebuild the image file (so your app will use the new data) or you can mount a volume into your Docker container which will be mapped to a folder on your Docker host. This allows to update the data (on the Docker host) without needing to touch the images.

To learn about mounting volumes, see the docker-volumes field described in http://www.shinyproxy.io/configuration/#docker

Hope this helps.

Best,
Tobias

1 Like

After updating the data files that the app reads(the server.ui and r.ui read csv files for data), I rebuild the app.

after the app is rebuilt via : docker build -t test/app1

I implement either of the two methods to refresh the image: via
sudo docker restart
or
docker stop <container ID>
docker rm <container ID>
docker run test/app1

However, it seems that to view the following app with the data changes I have to login and log out ShinyProxy. other wise the app page is blank.

Is there a way to update the app data without logging in and logging out. What would be your preferred method.

Thanks,
Babacar Diouf

1 Like

Hi @Babacar_Diouf,

When you update the image, there is no need to explicitly restart the docker service: the next time someone clicks the app (and asks to run a container), the latest image will be used. Also, manually stopping, removing and running containers should never be done as this is taken care of by ShinyProxy.

If the Shiny app is made in such a way that a user can trigger computations with updated data, there should be no need to log off and the user can trigger the computations (if the user has typically long sessions and if data updates are likely to happen during such long sessions).

Hope this helps.

Best,
Tobias