Skip to content

Commit

Permalink
Merge pull request #3 from Munksgaard/shinyproxy
Browse files Browse the repository at this point in the history
Add ShinyProxy configuration and Makefile
  • Loading branch information
Munksgaard authored May 27, 2024
2 parents a814c20 + 979c81c commit 4fd2362
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 0 deletions.
1 change: 1 addition & 0 deletions shinyproxy/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/shinyproxy-3.1.0.jar
14 changes: 14 additions & 0 deletions shinyproxy/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
HOST ?= livebook.munksgaard.me
SHINY_PORT ?= 8000
SHINY_JAR ?= shinyproxy-3.1.0.jar

.PHONY: caddy
caddy:
caddy reverse-proxy --from ${HOST} --to localhost:${SHINY_PORT}

.PHONY: shiny
shiny: ${SHINY_JAR}
java -jar ${SHINY_JAR}

${SHINY_JAR}:
wget https://shinyproxy.io/downloads/${SHINY_JAR}
48 changes: 48 additions & 0 deletions shinyproxy/application.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
proxy:
title: Open Analytics Shiny Proxy
logo-url: https://www.openanalytics.eu/shinyproxy/logo.png
landing-page: SingleApp
heartbeat-rate: 10000
heartbeat-timeout: 60000
port: 8000
# Follows this example:
# https://github.com/openanalytics/shinyproxy-config-examples/tree/master/13-openid-auth0
authentication: openid
openid:
auth-url: https://dev-86k35fwjrx0y5mgr.eu.auth0.com/authorize
token-url: https://dev-86k35fwjrx0y5mgr.eu.auth0.com/oauth/token
jwks-url: https://dev-86k35fwjrx0y5mgr.eu.auth0.com/.well-known/jwks.json
client-id: m3pJeGpCA27tZx2pBnLPZRzn3Tgl4IaT
# client-secret: SPECIFY USING PROXY_OPENID_CLIENT_SECRET ENV VAR!
username-attribute: "https://shinyproxy.io/nickname"
roles-claim: "https://shinyproxy.io/shinyproxy_roles"
logout-url: https://dev-86k35fwjrx0y5mgr.eu.auth0.com/oidc/logout?id_token_hint=#{oidcUser.idToken.tokenValue}&post_logout_redirect_uri=https%3A%2F%2Flivebook.munksgaard.me

admin-groups: admin

container-log-path: ./container-logs

docker:
port-range-start: 20000
image-pull-policy: Always
specs:
- id: 01_livebook
display-name: Livebook
description: Livebook instance for the Learn Programming with Elixir workshop.
container-image: ghcr.io/cphex/learn_programming_with_elixir:main
container-env:
LIVEBOOK_TOKEN_ENABLED: false
LIVEBOOK_BASE_URL_PATH: "#{proxy.getRuntimeValue('SHINYPROXY_PUBLIC_PATH')}" # "/app/01_livebook"
LIVEBOOK_WITHIN_IFRAME: true
port: 8080
additional-port-mappings:
- name: livebook_extra
port: 8081

server:
forward-headers-strategy: native
secure-cookies: true
same-site-cookie: Lax
logging:
file:
name: shinyproxy.log

0 comments on commit 4fd2362

Please sign in to comment.