-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
129 lines (118 loc) · 2.97 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
version: '3.3'
services:
# Main Application
app-server:
build:
context: ./app-server
dockerfile: Dockerfile
container_name: chess-game_app-server
restart: unless-stopped
command: nodemon ./bin/www-cluster # Comment it when production
env_file:
- ./env/app-server.env
volumes:
- ./app-server:/home/node/app
- ./node_modules:/home/node/app/node_modules
depends_on:
# - restapi-server
- socket-server
networks:
- chess-game-network
# Gameserver Application
socket-server:
build:
context: ./socket-server
dockerfile: Dockerfile
container_name: chess-game_socket-server
restart: unless-stopped
command: nodemon ./bin/www-cluster # Comment it when production
env_file:
- ./env/socket-server.env
volumes:
- ./socket-server:/home/node/app
- ./node_modules:/home/node/app/node_modules
depends_on:
# - restapi-server
- redis-message-broker
networks:
- chess-game-network
# Rest API Application
restapi-server:
build:
context: ./restapi-server
dockerfile: Dockerfile
container_name: chess-game_restapi-server
restart: unless-stopped
command: nodemon ./bin/www-cluster # Comment it when production
env_file:
- ./env/restapi-server.env
volumes:
- ./restapi-server:/home/node/app
- ./node_modules:/home/node/app/node_modules
ports:
- '8999:3000'
depends_on:
- redis-cache
networks:
- chess-game-network
# Redis Cache for whole system
redis-cache:
build:
context: ./docker/redis
dockerfile: Dockerfile
container_name: chess-game_redis-cache
restart: unless-stopped
volumes:
- redis-cache-data:/data
networks:
- chess-game-network
# Redis Message Broker for socket-server
redis-message-broker:
build:
context: ./docker/redis
dockerfile: Dockerfile
container_name: chess-game_redis-message-broker
restart: unless-stopped
volumes:
- redis-message-broker:/data
networks:
- chess-game-network
# Redisinsight for Redis GUI Management
redisinsight:
image: redislabs/redisinsight:latest
container_name: chess-game_redisinsight
restart: unless-stopped
ports:
- '8001:8001'
volumes:
- redisinsight-data:/db
networks:
- chess-game-network
# Reverse Proxy for whole system
nginx:
build:
context: ./docker/nginx
dockerfile: Dockerfile
container_name: chess-game_nginx
restart: unless-stopped
ports:
- '8080:80'
env_file:
- ./env/nginx.env
depends_on:
- app-server
- socket-server
# logging:
# driver: none
networks:
- chess-game-network
volumes:
redis-cache-data:
# name: chess-game_redis-cache
redis-message-broker:
# name: chess-game_redis-message-broker
redisinsight-data:
# name: chess-game_redisinsight
networks:
chess-game-network:
driver: bridge