-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
214 lines (201 loc) · 5.7 KB
/
Copy pathdocker-compose.yml
File metadata and controls
214 lines (201 loc) · 5.7 KB
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
213
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_SECRET
- AUTH_GITHUB_ORGANIZATION
- JWT_SECRET
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
- JWT_SECRET
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
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
- JWT_SECRET
- ZENODO_ACCESS_TOKEN
- ZOTERO_API_KEY
- ZOTERO_LIBRARY
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
nginx_ssl:
container_name: ${COMPOSE_PROJECT_NAME-rsd}-nginx-ssl
depends_on:
- reverse-proxy
environment:
# user should not have to change the values of the following environment variables:
- SSL_FORWARD=http://reverse-proxy:80
# user needs to assign values to the following environment variables:
- SSL_ADMIN_EMAIL
- SSL_DOMAINS
image: rsdnlesc/docker-term-letsencrypt
logging:
driver: "json-file"
options:
max-file: "2"
max-size: "40m"
ports:
- 443:443
- 80:80
restart: unless-stopped
volumes:
- ./docker-volumes/cert:/cert
- ./docker-volumes/letsencrypt:/etc/letsencrypt
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: