InfraHub
/
docker-compose.yml
96 строк · 1.7 Кб
1version: '3.8'
2
3services:
4backend:
5build: ./backend
6container_name: backend
7ports:
8- "8000:8000"
9environment:
10- APP_ENV=production
11- DB_HOST=db
12- DB_PORT=3306
13- DB_DATABASE=smart_infra
14- DB_USERNAME=root
15- DB_PASSWORD=secret
16depends_on:
17- db
18networks:
19- app-network
20
21frontend:
22build: ./frontend
23container_name: frontend
24ports:
25- "3000:3000"
26environment:
27- NEXT_PUBLIC_API_URL=http://localhost:8000/api
28depends_on:
29- backend
30networks:
31- app-network
32
33db:
34build: ./database
35container_name: db
36restart: always
37environment:
38MYSQL_DATABASE: smart_infra
39MYSQL_ROOT_PASSWORD: secret
40ports:
41- "3306:3306"
42volumes:
43- db_data:/var/lib/mysql
44networks:
45- app-network
46
47prometheus:
48build: ./monitoring/prometheus
49container_name: prometheus
50ports:
51- "9090:9090"
52volumes:
53- ./monitoring/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml
54networks:
55- app-network
56
57grafana:
58build: ./monitoring/grafana
59container_name: grafana
60ports:
61- "3001:3000"
62depends_on:
63- prometheus
64networks:
65- app-network
66
67xray:
68build: ./vpn-proxies/xray
69container_name: xray
70ports:
71- "1080:1080"
72networks:
73- app-network
74
75wireguard:
76build: ./vpn-proxies/wireguard
77container_name: wireguard
78ports:
79- "51820:51820/udp"
80networks:
81- app-network
82
83shadowsocks:
84build: ./vpn-proxies/shadowsocks
85container_name: shadowsocks
86ports:
87- "8388:8388"
88networks:
89- app-network
90
91volumes:
92db_data:
93
94networks:
95app-network:
96driver: bridge
97