generated from GDGVIT/template
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathdocker-stack.yml
49 lines (43 loc) · 971 Bytes
/
docker-stack.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
version: "3.0"
services:
db0:
image: mongo:latest
hostname: db0
env_file: ./.env
environment:
MONGO_INITDB_ROOT_USERNAME: "${MONGO_INITDB_ROOT_USERNAME}"
MONGO_INITDB_ROOT_PASSWORD: "${MONGO_INITDB_ROOT_PASSWORD}"
volumes:
- ./persistence/db0:/data/db
# entrypoint: [ "/usr/bin/mongod", "--bind_ip_all", "--replSet", "rs0" ]
redis:
image: redis:latest
env_file: ./.env
ports:
- "6379"
deploy:
replicas: 2
update_config:
parallelism: 2
delay: 10s
restart_policy:
condition: on-failure
command: "redis-server --requirepass $REDIS_PASSWORD"
volumes:
- ./persistence/redis:/data
backend:
image: angadsharma1016/hermes-backend
env_file: ./.env
deploy:
replicas: 1
restart_policy:
condition: on-failure
depends_on:
- db0
- redis
ports:
- 80:3000
- 443:3443
volumes:
db:
redis: