From 5a75d377a69840010cd56142297c5f5d0ac5a3c2 Mon Sep 17 00:00:00 2001 From: Friedemann Date: Fri, 12 Jan 2024 15:43:27 +0000 Subject: [PATCH] init --- arm64-docker/install_shiny_server.sh | 56 ++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 arm64-docker/install_shiny_server.sh diff --git a/arm64-docker/install_shiny_server.sh b/arm64-docker/install_shiny_server.sh new file mode 100644 index 0000000..259e78a --- /dev/null +++ b/arm64-docker/install_shiny_server.sh @@ -0,0 +1,56 @@ +#!/bin/bash +set -e + +# Install Shiny server + +git clone https://github.com/rstudio/shiny-server.git + +# Get into a temporary directory in which we'll build the project +cd shiny-server +mkdir tmp +cd tmp + + +# Install our private copy of Node.js +#/rocker_scripts/install_node.sh + +# Add the bin directory to the path so we can reference node +DIR=`pwd` +PATH=$DIR/../bin:$PATH + +# Use cmake to prepare the make step. Modify the "--DCMAKE_INSTALL_PREFIX" +# if you wish the install the software at a different location. +# cmake -DCMAKE_INSTALL_PREFIX=/usr/local ../ +# # Get an error here? Check the "How do I set the cmake Python version?" question below + +# # Compile native code and install npm dependencies +# make +# mkdir ../build +# echo `ls` +# (cd .. && ./bin/npm install) + +# Install the software at the predefined location +# sudo make install + +# Install default config file +sudo mkdir -p /etc/shiny-server +sudo cp ../config/default.config /etc/shiny-server/shiny-server.conf + + +# Place a shortcut to the shiny-server executable in /usr/bin +sudo ln -s /usr/local/shiny-server/bin/shiny-server /usr/bin/shiny-server + +# sudo rm /usr/local/shiny-server/ext/pandoc/pandoc +# sudo ln -s /usr/bin/pandoc /usr/local/shiny-server/ext/pandoc/pandoc + +# Create shiny user. On some systems, you may need to specify the full path to 'useradd' +sudo useradd -r -m shiny + +# Create log, config, and application directories +sudo mkdir -p /var/log/shiny-server +sudo mkdir -p /srv/shiny-server +sudo mkdir -p /var/lib/shiny-server +sudo chown shiny /var/log/shiny-server +sudo mkdir -p /etc/shiny-server + +# sudo cp -r ../samples/* /srv/shiny-server/