forked from njofce/zk-chat
-
Notifications
You must be signed in to change notification settings - Fork 4
/
docker-compose-prod.yaml
123 lines (110 loc) · 3.2 KB
/
docker-compose-prod.yaml
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
version: '3.1'
services:
traefik:
image: traefik:2.2
restart: always
ports:
- '80:80'
- '443:443'
volumes:
- ./traefik:/etc/traefik
- /var/run/docker.sock:/var/run/docker.sock
networks:
- apinetwork
mongo:
image: mongo:5.0.4-focal
restart: always
ports:
- 27017:27017
volumes:
- ./mongo-db:/data/db
networks:
- dbnetwork
redis:
image: redis:6.2.6-alpine
ports:
- 6379:6379
command: redis-server /usr/local/etc/redis/redis.conf
volumes:
- ./redis.conf:/usr/local/etc/redis/redis.conf
- ./redis-data:/data
networks:
- dbnetwork
rln-chat-server:
image: njofce/rln-chat-server
container_name: api
ports:
- "8080:8080"
- "8081:8081"
restart: always
expose:
- 8080
- 8081
labels:
- 'traefik.enable=true'
- 'traefik.docker.network=rlnanonymouschat_apinetwork'
- 'traefik.http.routers.zkchathttp.rule=Host(`api.test-zk-chat.mhchia.com`)'
- "traefik.http.routers.zkchathttp.service=zk_chat_http"
- 'traefik.http.routers.zkchathttp.tls=true'
- 'traefik.http.routers.zkchathttp.tls.certresolver=lets-encrypt'
- "traefik.http.services.zk_chat_http.loadbalancer.server.port=8080"
- 'traefik.http.routers.zkchatws.rule=Host(`api-ws.test-zk-chat.mhchia.com`)'
- "traefik.http.routers.zkchatws.service=zk_chat_ws"
- 'traefik.http.routers.zkchatws.tls=true'
- 'traefik.http.routers.zkchatws.tls.certresolver=lets-encrypt'
- "traefik.http.services.zk_chat_ws.loadbalancer.server.port=8081"
environment:
- REDIS_HOSTNAME=redis
- REDIS_PORT=6379
- REDIS_PASSWORD=password
- REDIS_CHANNEL=nodeSync
- INTERREP_BASE_URL=https://api.thegraph.com/subgraphs/name/interrep/kovan
- INTERREP_V2=https://test-zupass.mhchia.com:3002
- DB_CONNECTION_STRING=mongodb://mongo:27017/test
- SERVER_PORT=8080
- SOCKET_SERVER_PORT=8081
- MERKLE_TREE_LEVELS=16
- SPAM_TRESHOLD=1
- EPOCH_ALLOWED_DELAY_THRESHOLD=100
- INTERREP_SYNC_INTERVAL_SECONDS=20
- RLN_IDENTIFIER=518137101
- MESSAGES_CHANNEL=messages
- MESSAGES_BROADCAST_CHANNEL=message-broadcast
- UPDATES_CHANNEL=updates
depends_on:
- mongo
- redis
networks:
- apinetwork
- dbnetwork
rln-chat-client:
image: njofce/rln-chat-client
container_name: client
ports:
- "3000:3000"
expose:
- 3000
restart: always
labels:
- 'traefik.enable=true'
- 'traefik.docker.network=rlnanonymouschat_apinetwork'
- 'traefik.http.routers.client.rule=Host(`test-zk-chat.mhchia.com`)'
- 'traefik.http.routers.client.tls=true'
- 'traefik.http.routers.client.tls.certresolver=lets-encrypt'
environment:
- PORT=3000
- REACT_APP_SERVER_HOST=https://api.test-zk-chat.mhchia.com
- REACT_APP_SOCKET_HOST=wss://api-ws.test-zk-chat.mhchia.com
- REACT_APP_ENV=https://test-zk-chat.mhchia.com
depends_on:
- mongo
- redis
- rln-chat-server
networks:
- apinetwork
networks:
dbnetwork:
driver: bridge
internal: true
apinetwork:
driver: bridge