-
-
Notifications
You must be signed in to change notification settings - Fork 58
/
Copy pathdocker-compose.yml
135 lines (126 loc) · 2.71 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
version: "3.8"
services:
anonymous_github:
build: .
restart: always
image: tdurieux/anonymous_github:v2
ports:
- $EXPOSED_PORT:5000
env_file:
- ./.env
volumes:
- ./repositories:/app/repositories/
environment:
- PORT=5000
- REDIS_HOSTNAME=redis
- DB_HOSTNAME=mongodb
- STREAMER_ENTRYPOINT=http://streamer:5000/
healthcheck:
test:
- CMD
- node
- healthcheck.js
interval: 10s
timeout: 10s
retries: 5
depends_on:
- mongodb
- redis
- streamer
streamer:
build: .
restart: always
image: tdurieux/anonymous_github:v2
deploy:
mode: replicated
replicas: 4
endpoint_mode: dnsrr
entrypoint: ["node", "--require", "./opentelemetry.js", "./build/streamer/index.js"]
env_file:
- ./.env
volumes:
- ./repositories:/app/repositories/
environment:
- PORT=5000
- SERVICE_NAME=Streamer
healthcheck:
test:
- CMD
- node
- healthcheck.js
interval: 10s
timeout: 10s
retries: 5
redis:
image: "redis:alpine"
restart: always
ports:
- 127.0.0.1:6379:6379
healthcheck:
test:
- CMD
- redis-cli
- ping
interval: 10s
timeout: 10s
retries: 5
mongodb:
image: mongo:latest
restart: on-failure
environment:
MONGO_INITDB_ROOT_USERNAME: $DB_USERNAME
MONGO_INITDB_ROOT_PASSWORD: $DB_PASSWORD
volumes:
- mongodb_data_container:/data/db
ports:
- 127.0.0.1:27017:27017
command: --quiet
healthcheck:
test:
- CMD
- mongosh
- --eval
- "db.adminCommand('ping')"
interval: 10s
timeout: 10s
retries: 5
opentelemetry:
image: otel/opentelemetry-collector
restart: always
command: ["--config=/etc/otel-collector-config.yaml"]
volumes:
- ./opentelemetry-collector.yml:/etc/otel-collector-config.yaml
depends_on:
- jaeger
- prometheus
jaeger:
image: jaegertracing/all-in-one:latest
restart: always
ports:
- 127.0.0.1:16686:16686
prometheus:
image: prom/prometheus:latest
restart: always
volumes:
- ./prometheus.yaml:/etc/prometheus/prometheus.yml
ports:
- 127.0.0.1:9090:9090
mongodb-backup:
image: tiredofit/db-backup
links:
- mongodb
env_file:
- ./.env
volumes:
- ./db_backups:/backup
environment:
- DB_TYPE=mongo
- DB_HOST=mongodb
- DB_DUMP_FREQ=120
- DB_CLEANUP_TIME=500
- COMPRESSION=XZ
- DB_USER=$DB_USERNAME
- DB_PASS=$DB_PASSWORD
restart: always
volumes:
mongodb_data_container: