forked from letsgogeeky/transcendence
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
161 lines (152 loc) · 4.12 KB
/
docker-compose.yml
File metadata and controls
161 lines (152 loc) · 4.12 KB
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
149
150
151
152
153
154
155
156
157
158
159
160
services:
auth:
build:
context: ./backend/auth
dockerfile: Dockerfile
image: auth
ports:
- '8081:8081'
networks:
- app-network
volumes:
- ./certs:/app/certs
- ./uploads:/app/uploads
- ./db:/app/db
- ./backend/auth/src:/app/src
env_file: './.env'
environment:
- DATABASE_URL=file:/app/db/auth.db
match:
build:
context: ./backend/match
dockerfile: Dockerfile
image: match
ports:
- '8082:8082'
networks:
- app-network
volumes:
- ./db:/app/db
- ./uploads:/app/uploads
- ./certs:/app/certs
- ./backend/match/src:/app/src
env_file: './.env'
environment:
- DATABASE_URL=file:/app/db/match.db
depends_on:
- auth
chat:
build:
context: ./backend/chat
dockerfile: Dockerfile
image: chat
ports:
- '8083:8083'
networks:
- app-network
volumes:
- ./db:/app/db
- ./uploads:/app/uploads
- ./certs:/app/certs
- ./backend/chat/src:/app/src
env_file: './.env'
environment:
- DATABASE_URL=file:/app/db/chat.db
depends_on:
- auth
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
ports:
- '3000:3000'
volumes:
- ./frontend:/app
- /app/node_modules
- ./certs:/app/certs
networks:
- app-network
env_file: './.env'
depends_on:
- auth
- match
- chat
nginx:
container_name: nginx
restart: always
build:
context: ./infra/nginx
dockerfile: nginx.Dockerfile
networks:
- app-network
ports:
- '80:80'
- '443:443'
environment:
- NGINX_HOST=0.0.0.0
- NGINX_PORT=80
- FRONTEND=https://localhost
volumes:
- ./infra/nginx/conf/nginx.conf:/etc/nginx/nginx.conf
- ./certs:/etc/nginx/ssl
depends_on:
- auth
- match
- chat
- frontend
nginx-exporter:
image: nginx/nginx-prometheus-exporter
ports:
- '9113:9113'
networks:
- app-network
command:
- '-nginx.scrape-uri=http://nginx/status'
depends_on:
- nginx
node-exporter:
image: prom/node-exporter
ports:
- '9100:9100'
networks:
- app-network
prometheus:
image: prom/prometheus
ports:
- '9090:9090'
networks:
- app-network
volumes:
- ./infra/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml
- ./infra/prometheus/rules:/etc/prometheus/rules
- ./data/prometheus:/prometheus
command:
- '--config.file=/etc/prometheus/prometheus.yml'
- '--storage.tsdb.path=/prometheus'
- '--web.console.libraries=/usr/share/prometheus/console_libraries'
- '--web.console.templates=/usr/share/prometheus/consoles'
depends_on:
- node-exporter
- nginx-exporter
- auth
- match
- chat
grafana:
image: grafana/grafana
ports:
- '3001:3000'
networks:
- app-network
volumes:
- ./infra/grafana/provisioning:/etc/grafana/provisioning
- ./infra/grafana/dashboards:/var/lib/grafana/dashboards
- ./data/grafana:/var/lib/grafana
environment:
- GF_SECURITY_ADMIN_PASSWORD=${GRAFANA_PASSWORD}
- GF_SECURITY_ADMIN_USER=${GRAFANA_USERNAME}
- GF_USERS_ALLOW_SIGN_UP=false
depends_on:
- prometheus
networks:
app-network:
driver: bridge