-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
148 lines (135 loc) · 3.15 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
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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
version: "3.8"
services:
client:
container_name: monte_client
image: monte_client:latest
build:
context: ./mikromonte-client
dockerfile: Dockerfile
networks:
- monte_network
depends_on:
- games
- websocket
command: ["sh", "-c", "yarn start"]
restart: unless-stopped
websocket:
container_name: monte_ws
image: monte_ws:latest
build:
context: ./microsockets/src
dockerfile: Dockerfile
command: "./app"
networks:
- monte_network
restart: unless-stopped
# env_file:
# - src/.env
depends_on:
- redis_ecp
- games
api:
container_name: monte_api
image: monte_api:latest
build:
context: ./microapi/backend
command: bash -c "aerich upgrade && uvicorn core.main:app --host 0.0.0.0 --port 8080 --reload"
volumes:
- "./microapi/backend:/code"
env_file:
- ./microapi/backend/.env
restart: unless-stopped
depends_on:
- postgres
networks:
- monte_network
redis_ecp:
container_name: monte_redis_ecp
image: "redis:alpine"
command: >
sh -c '
redis-server &
sleep 5 &&
redis-cli SET CURRENT_ROULETTE_ROUND 1000 &&
redis-cli SET ROULETTE_PUBLIC_SEED 9088149294 &&
redis-cli SET ROULETTE_PRIVATE_SEED 274391412683be315d1755aca4dfb5708b24692eb5668efc68ececec66e21e0e &&
redis-cli SET CURRENT_COINFLIP_ROUND 1000 &&
# Additional key-setting commands here
tail -f /dev/null
'
volumes:
- redis_ecp_data:/data
networks:
- monte_network
redis_nbc:
container_name: monte_redis_nbc
image: "redis:alpine"
volumes:
- redis_nbc_data:/data
networks:
- monte_network
mongo:
image: mongo:latest
container_name: monte_mongo
environment:
MONGO_INITDB_ROOT_USERNAME: admin
MONGO_INITDB_ROOT_PASSWORD: pass
volumes:
- mongodb_data:/data/db
networks:
- monte_network
postgres:
container_name: monte_postgres
image: postgres:13
volumes:
- pg_data:/var/lib/postgresql/data
env_file:
- ./microapi/backend/.env
networks:
- monte_network
games:
image: monte_games:latest
build:
context: ./microgames
container_name: monte_games
command: ["bash", "-c", "sleep 8 && python main.py"]
depends_on:
- redis_ecp
- mongo
networks:
- monte_network
notifbalance:
image: monte_notifbalance:latest
build:
context: ./micronotif-balance
container_name: monte_notifbalance
command: ["bash", "-c", "python main.py"]
depends_on:
- websocket
- redis_nbc
- postgres
networks:
- monte_network
nginx:
container_name: monte_nginx
image: nginx:alpine
ports:
- "80:80"
depends_on:
- websocket
- api
- client
volumes:
- ./microapi/nginx/nginx.conf:/etc/nginx/nginx.conf:ro
restart: unless-stopped
networks:
- monte_network
networks:
monte_network:
driver: bridge
volumes:
redis_ecp_data:
redis_nbc_data:
mongodb_data:
pg_data:
# node_modules: