This repository has been archived by the owner on Jan 9, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from tsdataclinic/docker
Add Docker file to standardize the development env of the app. Helpful for dev on Linux and Windows (also probably os x)
- Loading branch information
Showing
4 changed files
with
54 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
FROM rocker/geospatial:3.5.0 | ||
|
||
|
||
|
||
RUN apt-get update; apt-get install -y inotify-tools | ||
|
||
ADD . /app | ||
WORKDIR /app | ||
RUN Rscript ./newerhoods/setup.R | ||
|
||
RUN chmod u+x entrypoint.sh | ||
ENTRYPOINT /app/entrypoint.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/bin/sh | ||
|
||
PORT=${2-3000} | ||
|
||
start () { | ||
R -e "source('newerhoods/settings_local.R'); shiny::runApp('newerhoods',port=$PORT, host='0.0.0.0')" & | ||
PID=$! | ||
} | ||
|
||
start | ||
|
||
inotifywait -mr newerhoods --format '%e %f' \ | ||
-e modify -e delete -e move -e create \ | ||
| while read event file; do | ||
|
||
echo $event $file | ||
|
||
kill $PID | ||
start | ||
|
||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters