-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
212 lines (200 loc) · 6.87 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
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
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
version: '3'
services:
admin:
build:
context: ./admin
command: sh -c "rm -rf /build/* && cp -r /usr/share/nginx/html/* /build"
container_name: ${COMPOSE_PROJECT_NAME-rsd}-admin
image: ${COMPOSE_PROJECT_NAME-rsd}/admin
logging:
driver: "json-file"
options:
max-file: "2"
max-size: "1m"
volumes:
- static_admin:/build
auth:
build:
context: ./auth-github
container_name: ${COMPOSE_PROJECT_NAME-rsd}-authentication
environment:
# user should not have to change the values of the following environment variables:
AUTH_CALLBACK_URL: /admin
AUTH_ROOT: /auth
# user needs to assign values to the following environment variables:
AUTH_GITHUB_CLIENT_ID: ${AUTH_GITHUB_CLIENT_ID:?Required variable AUTH_GITHUB_CLIENT_ID not set or empty. Perhaps you forgot to define it in '.env'?}
AUTH_GITHUB_CLIENT_SECRET: ${AUTH_GITHUB_CLIENT_SECRET:?Required variable AUTH_GITHUB_CLIENT_SECRET not set or empty. Perhaps you forgot to define it in '.env'?}
AUTH_GITHUB_ORGANIZATION: ${AUTH_GITHUB_ORGANIZATION:?Required variable AUTH_GITHUB_ORGANIZATION not set or empty. Perhaps you forgot to define it in '.env'?}
JWT_SECRET: ${JWT_SECRET:?Required variable JWT_SECRET not set or empty. Perhaps you forgot to define it in '.env'?}
image: ${COMPOSE_PROJECT_NAME-rsd}/authentication
logging:
driver: "json-file"
options:
max-file: "2"
max-size: "1m"
backend:
build:
context: ./backend
container_name: ${COMPOSE_PROJECT_NAME-rsd}-backend
depends_on:
- database
environment:
# user should not have to change the values of the following environment variables:
BACKEND_ROOT: /api
DATABASE_HOST: database
DATABASE_NAME: rsd
DATABASE_PORT: 27017
SCHEMAS_PATH: schemas
# user needs to assign values to the following environment variables:
DOMAIN: ${DOMAIN:?Required variable DOMAIN not set or empty. Perhaps you forgot to define it in '.env'?}
JWT_SECRET: ${JWT_SECRET:?Required variable JWT_SECRET not set or empty. Perhaps you forgot to define it in '.env'?}
image: ${COMPOSE_PROJECT_NAME-rsd}/backend
logging:
driver: "json-file"
options:
max-file: "2"
max-size: "10m"
backup:
build:
context: ./backup
container_name: ${COMPOSE_PROJECT_NAME-rsd}-backup
depends_on:
- database
environment:
# user should not have to change the values of the following environment variables:
DATABASE_HOST: database
DATABASE_NAME: rsd
DATABASE_PORT: 27017
# user needs to assign values to the following environment variables:
BACKUP_CMD: ${BACKUP_CMD:?Required variable BACKUP_CMD not set or empty. Perhaps you forgot to define it in '.env'?}
image: ${COMPOSE_PROJECT_NAME-rsd}/backup
logging:
driver: "json-file"
options:
max-file: "2"
max-size: "1m"
database:
build:
context: ./database
command: --bind_ip 0.0.0.0
container_name: ${COMPOSE_PROJECT_NAME-rsd}-database
entrypoint: /mongo.sh
image: ${COMPOSE_PROJECT_NAME-rsd}/database
logging:
driver: "json-file"
options:
max-file: "2"
max-size: "30m"
volumes:
- ./docker-volumes/db:/data/db
frontend:
build:
context: ./frontend
container_name: ${COMPOSE_PROJECT_NAME-rsd}-frontend
depends_on:
- backend
environment:
# user should not have to change the values of the following environment variables:
BACKEND_URL: http://backend:5001/api
image: ${COMPOSE_PROJECT_NAME-rsd}/frontend
logging:
driver: "json-file"
options:
max-file: "2"
max-size: "5m"
volumes:
- static_frontend:/shared_static
- ./docker-volumes/oaipmh-cache:/static/oaipmh-cache
graphs:
build:
context: ./graphs
command: sh -c "rm -rf /static_graphs/* && cp -r /usr/share/nginx/html/* /static_graphs/"
container_name: ${COMPOSE_PROJECT_NAME-rsd}-graphs
depends_on:
- backend
image: ${COMPOSE_PROJECT_NAME-rsd}/graphs
logging:
driver: "json-file"
options:
max-file: "2"
max-size: "1m"
volumes:
- static_graphs:/static_graphs
harvesting:
build:
context: ./harvesting
command: sh -c "cp -r /var/www/index.html /static_schedule/ && crond -d7 -f"
container_name: ${COMPOSE_PROJECT_NAME-rsd}-harvesting
depends_on:
- backend
- database
environment:
# user should not have to change the values of the following environment variables:
BACKEND_URL: http://backend:5001/api
DATABASE_HOST: database
DATABASE_NAME: rsd
DATABASE_PORT: 27017
# user needs to assign values to the following environment variables:
GITHUB_ACCESS_TOKEN: ${GITHUB_ACCESS_TOKEN:?Required variable GITHUB_ACCESS_TOKEN not set or empty. Perhaps you forgot to define it in '.env'?}
JWT_SECRET: ${JWT_SECRET:?Required variable JWT_SECRET not set or empty. Perhaps you forgot to define it in '.env'?}
ZENODO_ACCESS_TOKEN: ${ZENODO_ACCESS_TOKEN:?Required variable ZENODO_ACCESS_TOKEN not set or empty. Perhaps you forgot to define it in '.env'?}
ZOTERO_API_KEY: ${ZOTERO_API_KEY:?Required variable ZOTERO_API_KEY not set or empty. Perhaps you forgot to define it in '.env'?}
ZOTERO_LIBRARY: ${ZOTERO_LIBRARY:?Required variable ZOTERO_LIBRARY not set or empty. Perhaps you forgot to define it in '.env'?}
image: ${COMPOSE_PROJECT_NAME-rsd}/harvesting
logging:
driver: "json-file"
options:
max-file: "2"
max-size: "80m"
volumes:
- ./docker-volumes/oaipmh-cache:/app/oaipmh-cache
- static_schedule:/static_schedule
https:
container_name: ${COMPOSE_PROJECT_NAME-rsd}-https
depends_on:
- reverse-proxy
environment:
SSL_DOMAINS: ${SSL_DOMAINS:?Required variable SSL_DOMAINS not set or empty. Perhaps you forgot to define it in '.env'?}
build:
context: ./https
logging:
driver: "json-file"
options:
max-file: "2"
max-size: "40m"
ports:
- 443:443
- 80:80
restart: unless-stopped
volumes:
- caddy_data:/data
- caddy_config:/config
reverse-proxy:
build:
context: ./reverse-proxy
container_name: ${COMPOSE_PROJECT_NAME-rsd}-reverse-proxy
depends_on:
- frontend
- backend
- admin
- auth
- graphs
image: ${COMPOSE_PROJECT_NAME-rsd}/reverse_proxy
logging:
driver: "json-file"
options:
max-file: "2"
max-size: "20m"
restart: unless-stopped
volumes:
- static_admin:/static_admin:ro
- static_frontend:/static_frontend:ro
- static_graphs:/static_graphs:ro
- static_schedule:/static_schedule:ro
volumes:
static_admin:
static_frontend:
static_graphs:
static_schedule:
caddy_data:
caddy_config: