-
-
Notifications
You must be signed in to change notification settings - Fork 81
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
111 lines (105 loc) · 2.13 KB
/
docker-compose.yml
File metadata and controls
111 lines (105 loc) · 2.13 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
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", "./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
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: