-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
59 lines (59 loc) · 1.92 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
version: '3.5'
services:
mongo:
image: mongo:4.2
container_name: clav_mongo
restart: always
volumes:
- mongodb-data:/data/db
graphdb:
image: ${GRAPHDB_IMG}
container_name: clav_graphdb
restart: always
volumes:
- graphdb-data:/opt/graphdb/home/data/repositories
server:
image: ${SERVER_IMG}
container_name: clav_server
restart: always
environment:
- NODE_ENV=production
- SWAGGER_URL=${SWAGGER_URL}
- GRAPHDB=graphdb:7200
- MONGODB=mongo
- API_VERSION=${API_VERSION}
- INTERFACE_HOSTS=${INTERFACE_HOSTS}
interface:
image: ${INTERFACE_IMG}
container_name: interface
restart: always
environment:
- SERVER_URL=http://server:7779
- CERTS_API=${CERT_API_FOLDER}
- CERTS_INT=${CERT_INT_FOLDER}
- API_VERSION=${API_VERSION}
- DOMAINS_SERVER=${DOMAINS_SERVER}
- DOMAINS_INTERFACE=${DOMAINS_INTERFACE}
volumes:
- ${PWD}/${NGINX_FILE}:/etc/nginx/nginx.conf.template
- ${PWD}/beforeStart.sh:/beforeStart.sh
- ${PWD}/afterStart.sh:/afterStart.sh
- acme-data:${ACME_FOLDER}
- crontabs:/var/spool/cron/crontabs/
command: /bin/bash -c "/beforeStart.sh ${CERT_API_FOLDER} && /beforeStart.sh ${CERT_INT_FOLDER} && envsubst '$$SERVER_URL $$CERTS_API $$CERTS_INT $$API_VERSION $$DOMAINS_SERVER $$DOMAINS_INTERFACE' < /etc/nginx/nginx.conf.template > /etc/nginx/nginx.conf && (nginx -g 'daemon off;' &) && /afterStart.sh -c ${CERT_API_FOLDER} -a ${ACME_FOLDER} ${DOMAINS_SERVER} && /afterStart.sh -c ${CERT_INT_FOLDER} -a ${ACME_FOLDER} ${DOMAINS_INTERFACE} && tail -f /dev/null"
ports:
- "${HTTP_PORT}:7779"
- "${HTTPS_PORT}:7780"
volumes:
mongodb-data:
external: false
name: clav-mongodb-data
graphdb-data:
external: false
name: clav-graphdb-data
acme-data:
external: false
name: acme-data
crontabs:
external: false
name: crontabs