Upload init.sh
Browse files
init.sh
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/bin/bash
|
| 2 |
+
set -Eeuo pipefail
|
| 3 |
+
PORT_TO_USE="${PORT:-7860}"
|
| 4 |
+
|
| 5 |
+
# escreve config do Shiny Server usando a porta do Space
|
| 6 |
+
cat > /etc/shiny-server/shiny-server.conf <<CONF
|
| 7 |
+
run_as shiny;
|
| 8 |
+
server {
|
| 9 |
+
listen ${PORT_TO_USE};
|
| 10 |
+
location / {
|
| 11 |
+
site_dir /srv/shiny-server;
|
| 12 |
+
log_dir /var/log/shiny-server;
|
| 13 |
+
directory_index on;
|
| 14 |
+
}
|
| 15 |
+
}
|
| 16 |
+
CONF
|
| 17 |
+
|
| 18 |
+
exec /usr/bin/shiny-server
|