-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
39 lines (38 loc) · 1.1 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
services:
web:
build:
context: .
target: builder
image: cspdna-r:devsetup
command: apachectl -DFOREGROUND
environment:
R_LIBS_USER:
_R_CHECK_FORCE_SUGGESTS_:
restart: unless-stopped
healthcheck:
test: netstat -an | grep 0.0.0.0:80 > /dev/null; if [ 0 != $$? ]; then exit 1; fi;
ports:
- 8004:80
# docker-compose run test bash
# R
# devtools::load_all(); testthat::test_dir("tests/") # Run this every time you change your code.
# OR (sometimes a better result, mostly less useful feedback)
# devtools::test()
# TODO maybe use https://rdrr.io/cran/testthat/man/test_file.html
test:
build:
context: .
target: builder
image: cspdna-r:devsetup
command: R
environment:
CI_COMMIT_SHA: $CI_COMMIT_SHA
volumes:
# we map individual dirs, because Henk failed to make packrat install in /packrat.
# that would be a nicer solution.
- ./R/:/app/R
- ./tests:/app/tests
- ./svgs:/app/svgs
- ./svc.prediction.Rcheck:/app/svc.prediction.Rcheck
- ./inst:/app/inst
# - .:/app