-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add docker compose for local deployment
- Loading branch information
1 parent
154d6d5
commit b75fe77
Showing
4 changed files
with
61 additions
and
1 deletion.
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,2 @@ | ||
README.md | ||
dev_local |
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,41 @@ | ||
FROM opencpu/base:latest | ||
|
||
#install needed dependenciesp | ||
RUN apt-get update && apt-get install -y \ | ||
libcurl4-gnutls-dev \ | ||
&& apt install -y cmake \ | ||
## clean up | ||
&& apt-get clean \ | ||
&& rm -rf /var/lib/apt/lists/ \ | ||
&& rm -rf /tmp/downloaded_packages/ /tmp/*.rds \ | ||
&& rm -rf /var/www/html/index.html | ||
|
||
RUN cp /etc/apache2/mods-available/rewrite.load /etc/apache2/mods-enabled/ && \ | ||
cp /etc/apache2/mods-available/headers.load /etc/apache2/mods-enabled/ | ||
|
||
RUN R -e "install.packages('devtools')" | ||
RUN R -e "install.packages('remotes')" | ||
RUN R -e "install.packages('ggplot2')" | ||
RUN R -e "install.packages('meta')" | ||
RUN R -e "install.packages('rlang')" | ||
RUN R -e 'remove.packages("rlang", "/usr/lib/opencpu/library")' | ||
RUN R -e 'remove.packages("vctrs", "/usr/lib/opencpu/library")' | ||
RUN R -e "install.packages('vctrs')" | ||
|
||
COPY . /home/opencpu/fearbase | ||
|
||
RUN echo $(ls -1 /home/opencpu/fearbase) && sleep 1000 | ||
|
||
RUN cd /home/opencpu && \ | ||
R -e "install.packages('remotes')" && \ | ||
R CMD build fearbase && \ | ||
mv fearbase_*.tar.gz fearbase_latest.tar.gz && \ | ||
R CMD INSTALL fearbase_latest.tar.gz --library=/usr/local/lib/R/site-library | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
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,8 @@ | ||
services: | ||
opencpu: | ||
build: | ||
context: ../ | ||
dockerfile: ./dev_local/Dockerfile | ||
ports: | ||
- 80:80 | ||
- 8004:8004 |