Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix shiny timeout #3

Merged
merged 4 commits into from
Dec 14, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 13 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@ FROM rocker/shiny
# set author
MAINTAINER Lain Pavot <lain.pavot@inra.fr>

## we copy the installer and run it before copying the entier project to prevent
## we copy the installer and run it before copying the entire project to prevent
## reinstalling everything each time the project has changed

COPY ./gxit/install.R /tmp/
@@ -31,15 +31,23 @@ RUN \
# inside we will find our Shiny app log file:
# docker run -p 8888:8888 -e LOG_PATH=/tmp/shiny/gxit.log -v $PWD/log:/tmp/shiny <container_name>

ARG PORT=8888
ARG LOG_PATH=/tmp/gxit/gxit.log
ARG PORT=8765
ARG LOG_PATH=/tmp/gxit.log

ENV LOG_PATH=$LOG_PATH
ENV PORT=$PORT

# ------------------------------------------------------------------------------

# Edit shiny-server config
RUN cat /etc/shiny-server/shiny-server.conf \
| sed "s/3838/${PORT}/" > /etc/shiny-server/shiny-server.conf.1
RUN mv /etc/shiny-server/shiny-server.conf.1 /etc/shiny-server/shiny-server.conf

# ------------------------------------------------------------------------------

RUN mkdir -p $(dirname "${LOG_PATH}")
EXPOSE $PORT
COPY ./gxit /gxit
CMD R -e "shiny::runApp('/gxit', host='0.0.0.0', port=${PORT})" 2>&1 > "${LOG_PATH}"
COPY ./gxit/app.R /srv/shiny-server/

CMD ["/bin/sh", "-c", "shiny-server > ${LOG_PATH} 2>&1"]
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
docker_name=first-gxit
docker_repo=ancelete
internal_port=8765
port=-p 127.0.0.1:8765:$(internal_port)
internal_port=3838
port=-p 127.0.0.1:3838:$(internal_port)
log_path=/var/log/tuto-gxit-01.log
WEB_TAG=1.0.0
WEB_TARGET=${docker_repo}/${docker_name}:${WEB_TAG}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -24,7 +24,7 @@ Deploy
Test
----
- `make it`
- `## Then go to 127.0.0.1:8765`
- `## Then go to 127.0.0.1:3838`


Update
8 changes: 4 additions & 4 deletions interactivetool_tabulator.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<tool id="interactive_tool_tabulator" tool_type="interactive" name="Tabulator" version="1.0.0">
<description>Tuto tool for Gxit</description>
<requirements>
<container type="docker">ancelete/first-gxit:latest</container>
<container type="docker">neoformit/gtn-gxit:latest</container>
</requirements>
<entry_points>
<entry_point name="first gxit" requires_domain="True">
@@ -10,7 +10,7 @@
</entry_point>
</entry_points>
<command><![CDATA[
R -e "shiny::runApp('/gxit', host='0.0.0.0', port=8765)" 2>&1 > "/var/log/tuto-gxit-01.log"
exec shiny-server 2>&1 > \${LOG_PATH}
]]>
</command>
<inputs>
@@ -28,8 +28,8 @@
<citations>
<citation type="bibtex">
@misc{
author = {Lain Pavot - lain.pavot@inrae.fr },
title = {{first-gxit - A tool to visualise tsv/csv files }},
author = {Lain Pavot - lain.pavot@inrae.fr},
title = {first-gxit - A tool to visualise tsv/csv files},
publisher = {INRAE},
url = {}
}