From 76f1c607625c82fa580e57f68c16d6fa3c69a8ab Mon Sep 17 00:00:00 2001 From: eldrid01 Date: Sat, 21 May 2022 09:58:20 +0100 Subject: [PATCH] Added tasks for starting and stopping the Shiny server, starting a shell inside the container and for building a Singularity image --- Makefile | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/Makefile b/Makefile index 51e26b7..a3cb116 100644 --- a/Makefile +++ b/Makefile @@ -10,3 +10,37 @@ release: build singularity: build singularity build shiny-base-${version}.sif docker-daemon://crukcibioinformatics/shiny-base:${version} +shell: + mkdir -p logs lib/bookmarks/shiny apps + chmod -R ugo+rwx lib logs + docker run \ + --user shiny \ + --interactive \ + --tty \ + --rm \ + --entrypoint=bash \ + --volume ${PWD}/shiny-server.conf:/etc/shiny-server/shiny-server.conf \ + --volume ${PWD}/lib:/var/lib/shiny-server \ + --volume ${PWD}/logs:/var/log/shiny-server \ + --volume ${PWD}/apps:/srv/shiny-server/apps \ + crukcibioinformatics/shiny-base:${version} + +start: + rm -rf logs + mkdir -p logs lib/bookmarks/shiny apps + chmod -R ugo+rwx lib logs + docker run \ + --user shiny \ + --detach \ + --rm \ + --name shiny_server \ + --publish 8080:3838 \ + --volume ${PWD}/shiny-server.conf:/etc/shiny-server/shiny-server.conf \ + --volume ${PWD}/lib:/var/lib/shiny-server \ + --volume ${PWD}/logs:/var/log/shiny-server \ + --volume ${PWD}/apps:/srv/shiny-server/apps \ + crukcibioinformatics/shiny-base:${version} + +stop: + docker stop shiny_server +