-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
93 lines (89 loc) · 2.76 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
version: '3.5'
services:
lb:
image: nginx
container_name: nginx_loadbalancer
ports:
- "8081:8081"
networks:
- frontend
volumes:
- ./nginx/http.conf:/etc/nginx/nginx.conf
restart: always
depends_on:
- api1
- api2
- api3
redis:
image: redis:alpine
hostname: redis
container_name: redis_cache
ports:
- "6379:6379"
networks:
- backend
volumes:
- redis_data:/data/redis
restart: always
api1:
image: pickezdocker/inditeminds-api:1.0.0 # default is my images,or you can build locally
hostname: api1
container_name: api_primary
networks:
- frontend
- backend
environment:
- PORT=5555
- NODE_ENV="production"
- MONGODB_PROD_URI=<your_mongo_atlas_cluster_uri>
- JWT_ACC_TOKEN_SECRET=<your_jwt_access_token_secret>
- JWT_ACC_TOKEN_VALID_UNTIL=<your_jwt_access_token_opts_expiresIn>
- JWT_REF_TOKEN_SECRET=<your_jwt_refresh_token_secret>
- JWT_REF_TOKEN_VALID_UNTIL=<your_jwt_refresh_token_opts_expiresIn>
- REDIS_HOST=redis
restart: always
depends_on:
- redis
api2:
image: pickezdocker/inditeminds-api:1.0.0 # default is my images,or you can build locally
hostname: api2
container_name: api_first_backup
networks:
- frontend
- backend
environment:
- PORT=7777
- NODE_ENV="production"
- MONGODB_PROD_URI=<your_mongo_atlas_cluster_uri>
- JWT_ACC_TOKEN_SECRET=<your_jwt_access_token_secret>
- JWT_ACC_TOKEN_VALID_UNTIL=<your_jwt_access_token_opts_expiresIn>
- JWT_REF_TOKEN_SECRET=<your_jwt_refresh_token_secret>
- JWT_REF_TOKEN_VALID_UNTIL=<your_jwt_refresh_token_opts_expiresIn>
- REDIS_HOST=redis
restart: always
depends_on:
- redis
api3:
image: pickezdocker/inditeminds-api:1.0.0 # default is my images,or you can build locally
hostname: api3
container_name: api_second_backup
networks:
- frontend
- backend
environment:
- PORT=8888
- NODE_ENV="production"
- MONGODB_PROD_URI=<your_mongo_atlas_cluster_uri>
- JWT_ACC_TOKEN_SECRET=<your_jwt_access_token_secret>
- JWT_ACC_TOKEN_VALID_UNTIL=<your_jwt_access_token_opts_expiresIn>
- JWT_REF_TOKEN_SECRET=<your_jwt_refresh_token_secret>
- JWT_REF_TOKEN_VALID_UNTIL=<your_jwt_refresh_token_opts_expiresIn>
- REDIS_HOST=redis
restart: always
depends_on:
- redis
volumes:
redis_data:
networks:
frontend:
backend: