-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathdocker-compose.prod.yml
153 lines (146 loc) · 3.82 KB
/
docker-compose.prod.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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
version: "3"
services:
auth:
container_name: ctmd-auth
image: renci/txautht:1.1
restart: always
environment:
API_KEY: $AUTH_API_KEY
PROVIDERS: $AUTH_PROVIDER
ports:
- 8080:8080
expose:
- 8080
redis:
container_name: ctmd-redis
build:
context: ./redis/
dockerfile: Dockerfile
restart: always
environment: {}
volumes:
- ./redis/data/:/data
expose:
- 6379
command: ["--appendonly", "yes"]
pipeline:
container_name: ctmd-pipeline
image: txscience/ctmd-pipeline-reload:v2.11
restart: always
environment:
POSTGRES_DATABASE_NAME: $POSTGRES_DB
POSTGRES_USER: $POSTGRES_USER
POSTGRES_PASSWORD: $POSTGRES_PASSWORD
POSTGRES_PORT: $POSTGRES_PORT
POSTGRES_HOST: db
REDCAP_APPLICATION_TOKEN: $REDCAP_APPLICATION_TOKEN
REDCAP_URL_BASE: $REDCAP_URL_BASE
POSTGRES_DUMP_PATH: /backup
AUXILIARY_PATH: /auxiliary
FILTER_PATH: /filter
BLOCK_PATH: /block
RELOAD_SCHEDULE: $RELOAD_SCHEDULE
RELOAD_DATABASE: $RELOAD_DATABASE
SCHEDULE_RUN_TIME: $SCHEDULE_RUN_TIME
SERVER: 1
REDIS_QUEUE_HOST: redis
REDIS_QUEUE_PORT: 6379
REDIS_QUEUE_DB: 0
REDIS_LOCK_HOST: redis
REDIS_LOCK_PORT: 6379
REDIS_LOCK_DB: 1
REDIS_LOCK_EXPIRE: 28800
REDIS_LOCK_TIMEOUT: 28800
TASK_TIME: 28800
SPARK_EXECUTOR_MEMORY: 8g
SPARK_DRIVER_MEMORY: 8g
PAUSE: $PAUSE
DATA_INPUT_FILE_PATH: $DATA_INPUT_FILE_PATH
DOWNLOAD_REDCAP_DATA: $DOWNLOAD_REDCAP_DATA
CREATE_TABLES: $CREATE_TABLES
GLOBAL_WRITE_PERMISSIONS: $GLOBAL_WRITE_PERMISSIONS
volumes:
- $POSTGRES_DUMP_PATH:/backup
- $AUXILIARY_PATH:/auxiliary
- $FILTER_PATH:/filter
- $BLOCK_PATH:/block
- $MAPPING_LOCAL_PATH:/mapping.json
# - ./syntheticDataset.json:$DATA_INPUT_FILE_PATH
depends_on:
- db
- redis
expose:
- 5000
db:
container_name: ctmd-db
restart: always
build:
context: ./db/
dockerfile: Dockerfile
environment:
POSTGRES_DB: $POSTGRES_DB
POSTGRES_USER: $POSTGRES_USER
POSTGRES_PASSWORD: $POSTGRES_PASSWORD
POSTGRES_PORT: $POSTGRES_PORT
volumes:
- ./db/data:/var/lib/postgresql/data
- /etc/passwd:/etc/passwd:ro
- /etc/groups:/etc/groups:ro
user: $USER
expose:
- $POSTGRES_PORT
api:
container_name: ctmd-api
build:
context: ./api/
dockerfile: Dockerfile
volumes:
- ./api:/usr/src/app
- /usr/src/app/node_modules/
ports:
- $API_PORT:$API_PORT
environment:
AUTH_ENV: production
NODE_ENV: production
API_PORT: $API_PORT
POSTGRES_DB: $POSTGRES_DB
POSTGRES_USER: $POSTGRES_USER
POSTGRES_PASSWORD: $POSTGRES_PASSWORD
POSTGRES_PORT: $POSTGRES_PORT
FUSE_AUTH_API_KEY: $AUTH_API_KEY
DASHBOARD_URL: $DASHBOARD_URL
API_SESSION_SECRET: $API_SESSION_SECRET
REACT_APP_API_ROOT: $REACT_APP_API_ROOT
AUTH_URL: $AUTH_URL
IS_HEAL_SERVER: $IS_HEAL_SERVER
depends_on:
- db
restart: always
frontend:
container_name: ctmd-frontend
build:
args:
NODE_ENV: production
REACT_APP_API_ROOT: $REACT_APP_API_ROOT
REACT_APP_DATA_API_ROOT: $REACT_APP_DATA_API_ROOT
REACT_APP_IS_HEAL_SERVER: $IS_HEAL_SERVER
context: ./frontend/
dockerfile: Dockerfile-prod
volumes:
- ./frontend:/usr/src/app
- /usr/src/app/node_modules
- ./frontend/nginx.conf:/etc/nginx/conf.d/default.conf
- ./frontend/.htpasswd:/etc/nginx/.htpasswd
ports:
- 80:80
depends_on:
- api
- pipeline
restart: always
networks:
default:
driver: bridge
ipam:
driver: default
config:
- subnet: ${IPAM_CONFIG_SUBNET}