Skip to content
Snippets Groups Projects
Unverified Commit 47627731 authored by Todor Kondic's avatar Todor Kondic
Browse files

roles/shinyproxy: systemd service now works.

parent 7093be2f
No related branches found
No related tags found
No related merge requests found
...@@ -23,6 +23,9 @@ proxy: ...@@ -23,6 +23,9 @@ proxy:
container-cpu-limit: 4 container-cpu-limit: 4
display-name: Shinyscreen display-name: Shinyscreen
port: 7777 port: 7777
heartbeat-enabled: false
stop-on-logout: false
max-lifetime: 1440
container-volumes: [ "/eci-users:/scratch" ] container-volumes: [ "/eci-users:/scratch" ]
container-cmd: [ "R", "-e", "library(future);future::plan('multisession');usdir=Sys.getenv('SHINYPROXY_USERNAME');indir=file.path('/scratch',usdir);shinyscreen::serve(indir=indir,topuserdir='/scratch',user=usdir)"] container-cmd: [ "R", "-e", "library(future);future::plan('multisession');usdir=Sys.getenv('SHINYPROXY_USERNAME');indir=file.path('/scratch',usdir);shinyscreen::serve(indir=indir,topuserdir='/scratch',user=usdir)"]
access-groups: [overseers,eci] access-groups: [overseers,eci]
......
#!/bin/sh
cd /eci-users/proxer
exec java -jar shinyproxy.jar
...@@ -6,10 +6,11 @@ ReloadPropagatedFrom=docker.service nginx.service ...@@ -6,10 +6,11 @@ ReloadPropagatedFrom=docker.service nginx.service
[Service] [Service]
Type=simple Type=simple
ExecStart=/usr/bin/java -jar shinyproxy.jar TimeoutStartSec=15s
ExecStart=/eci-users/proxer/run_shinyproxy.sh
RestartSec=5s
Restart=on-failure Restart=on-failure
User=proxer User=proxer
WorkingDirectory=/eci_users/proxer
[Install] [Install]
WantedBy=multi-user.target WantedBy=multi-user.target
...@@ -26,4 +26,5 @@ ...@@ -26,4 +26,5 @@
ansible.builtin.service: ansible.builtin.service:
name: shinyproxy name: shinyproxy
state: restarted state: restarted
daemon_reload: yes
enabled: yes enabled: yes
...@@ -115,6 +115,15 @@ ...@@ -115,6 +115,15 @@
chdir: /eci-users/proxer chdir: /eci-users/proxer
executable: python3 executable: python3
- name: Copy shinyproxy script.
tags: shinyproxy-conf
notify: shinyproxy-service
ansible.builtin.copy:
src: eci-users/proxer/run_shinyproxy.sh
dest: /eci-users/proxer/run_shinyproxy.sh
owner: proxer
mode: '0744'
- name: Copy service file for shinyproxy. - name: Copy service file for shinyproxy.
tags: shinyproxy-conf tags: shinyproxy-conf
notify: shinyproxy-service notify: shinyproxy-service
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment