-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
90 lines (89 loc) · 2.72 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
---
version: "3.4"
services:
database:
restart: always
image: postgres:12
container_name: herdbook-db
env_file:
- ./.docker/database-variables.env
environment:
- POSTGRES_HOST_AUTH_METHOD=trust
volumes:
- ./postgres-data:/var/lib/postgresql/data
herdbook-frontend:
image: herdbook_frontend
container_name: herdbook_frontend
build:
context: ./
dockerfile: .docker/frontend
cache_from:
- ghcr.io/nbisweden/herdbook_frontend
command: bash -c "rm -rf /home/node/app/node_modules/* && npm run start"
volumes:
- ./frontend:/home/node/app/
- exclude:/home/node/app/node_modules
environment:
- NODE_OPTIONS="--max-old-space-size=2048"
main:
image: herdbook_main
build:
context: ./
dockerfile: .docker/main
cache_from:
- ghcr.io/nbisweden/herdbook_main
container_name: herdbook-main
env_file:
- ./.docker/database-variables.env
- ./.docker/r-api-variables.env
- ./.docker/main-api-variables.env
ports:
- 8080:8080
- 8443:8443
volumes:
- type: bind
source: ./app
target: /api_src
- type: bind
source: ./config
target: /config
- type: bind
source: ./logs
target: /logs
depends_on:
- database
- herdbook-frontend
r-api:
container_name: r-api
build:
context: ./
dockerfile: .docker/r-api
cache_from:
- ghcr.io/nbisweden/herdbook_r-api
env_file:
- ./.docker/database-variables.env
- ./.docker/r-api-variables.env
image: herdbook_r-api
volumes:
- type: bind
source: ./R
target: /code
s3backend:
command: -c 'echo s3user:x:$$(stat -c %u /data):0:s3 user:/:/bin/sh >> /etc/passwd && su s3user -c "mkdir -p /data/$${S3_BUCKET} && minio server /data"'
entrypoint: /bin/sh
container_name: s3backend
environment:
- MINIO_ACCESS_KEY=accesskeytest
- MINIO_SECRET_KEY=secretkeytest
env_file:
- ./.docker/main-api-variables.env
volumes:
- ./s3data:/data
healthcheck:
test: ["CMD", "curl", "-fkq", "http://localhost:9000/minio/health/live"]
interval: 5s
timeout: 20s
retries: 3
image: minio/minio:RELEASE.2021-04-18T19-26-29Z
volumes:
exclude: null