-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose-prod.yml
121 lines (111 loc) · 2.85 KB
/
docker-compose-prod.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
x-global-env: &global-env
MONGO_USER: ${MONGO_USER}
MONGO_PASSWORD: ${MONGO_PASSWORD}
MONGO_PORT: ${MONGO_PORT}
MONGO_DB_NAME: ${MONGO_DB_NAME}
MONGO_CONTAINER: mongodb-prod
x-common-rest-server-env: &common-rest-server-env
<<: *global-env
NODE_ENV: prod
LOG_LEVEL: debug
PORT: 3500
ICON_NETWORK: mainnet
AUTH_URL: http://auth-server:3005
MAILERLITE_GROUP_ID: ${MAILERLITE_GROUP_ID}
MAILERLITE_API_KEY: ${MAILERLITE_API_KEY}
services:
auth-server:
image: "iconcommunity/icon-wallet-auth-backend-app:1.0.3"
container_name: auth-server
restart: always
ports:
- "3005:3005"
networks:
- mynetworkprod
environment:
- NODE_ENV=production
- JWT_SECRET="VERY SECRET SECRET TO BE CHANGED IN PRODUCTION 98237492"
- JWT_EXPIRES_IN_S=604800
- CHALLENGE_EXPIRATION_TIME_MS=180000
- AUTH_TTL=60000
- AUTH_LIMIT=300
- CORS_ENABLED=true
- PORT=3005
mongodb-prod:
image: mongo:latest
container_name: mongodb-prod
restart: always
ports:
- "27017:27017"
networks:
- mynetworkprod
environment:
MONGO_INITDB_ROOT_USERNAME: ${MONGO_USER}
MONGO_INITDB_ROOT_PASSWORD: ${MONGO_PASSWORD}
# This is the volume that will be used to persist
# the data while running in prod
volumes:
- ./db/data:/data/db
blockchain-scraper:
container_name: blockchain-scraper
build:
context: ./db-manager
restart: always
depends_on:
- mongodb-prod
- rest-server1
networks:
- mynetworkprod
command: ["node", "blockchain-scraper.js"]
environment:
<<: *global-env
DB_MANAGER_PORT: ${DB_MANAGER_PORT}
USER_COLLECTION: ${USER_COLLECTION}
TASK_COLLECTION: ${TASK_COLLECTION}
SEASON_COLLECTION: ${SEASON_COLLECTION}
USER_TASK_COLLECTION: ${USER_TASK_COLLECTION}
REFERRALS_COLLECTION: ${REFERRALS_COLLECTION}
rest-server1:
container_name: rest-server1
build:
context: ./nestjs-rest-server
restart: always
ports:
- "3501:3500"
depends_on:
- mongodb-prod
- auth-server
networks:
- mynetworkprod
volumes:
- ./logs:/logs
environment: *common-rest-server-env
# rest-server2:
# container_name: rest-server2
# build:
# context: ./nestjs-rest-server
# restart: always
# ports:
# - "3502:3500"
# depends_on:
# - mongodb-prod
# - auth-server
# networks:
# - mynetworkprod
# environment: *common-rest-server-env
# rest-server3:
# container_name: rest-server3
# build:
# context: ./nestjs-rest-server
# restart: always
# ports:
# - "3503:3500"
# depends_on:
# - mongodb-prod
# - auth-server
# networks:
# - mynetworkprod
# environment: *common-rest-server-env
networks:
mynetworkprod:
driver: bridge