web
/
docker-compose.yml
106 строк · 2.0 Кб
1version: '3.8'
2
3services:
4backend:
5build:
6context: ./backend
7dockerfile: docker/Dockerfile
8container_name: backend
9env_file:
10- ./backend/.env
11ports:
12- "8000:8000"
13depends_on:
14- db
15networks:
16- app-network
17
18frontend:
19build:
20context: ./frontend
21dockerfile: docker/Dockerfile
22container_name: frontend
23ports:
24- "3000:3000"
25depends_on:
26- backend
27networks:
28- app-network
29
30db:
31image: postgres:14
32container_name: db
33environment:
34POSTGRES_USER: your_user
35POSTGRES_PASSWORD: your_password
36POSTGRES_DB: smart_infra
37volumes:
38- db-data:/var/lib/postgresql/data
39networks:
40- app-network
41
42xray:
43build:
44context: ./vpn-proxy/xray
45container_name: xray
46ports:
47- "10000:10000"
48volumes:
49- ./vpn-proxy/xray/config.json:/etc/xray/config.json
50networks:
51- app-network
52
53shadowsocks:
54build:
55context: ./vpn-proxy/shadowsocks
56container_name: shadowsocks
57ports:
58- "8388:8388"
59volumes:
60- ./vpn-proxy/shadowsocks/config.json:/etc/shadowsocks/config.json
61networks:
62- app-network
63
64wireguard:
65build:
66context: ./vpn-proxy/wireguard
67container_name: wireguard
68ports:
69- "51820:51820/udp"
70volumes:
71- ./vpn-proxy/wireguard/wg0.conf:/etc/wireguard/wg0.conf
72cap_add:
73- NET_ADMIN
74networks:
75- app-network
76
77prometheus:
78build:
79context: ./monitoring/prometheus
80container_name: prometheus
81ports:
82- "9090:9090"
83volumes:
84- ./monitoring/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml
85networks:
86- app-network
87
88grafana:
89image: grafana/grafana:latest
90container_name: grafana
91ports:
92- "3001:3000"
93volumes:
94- grafana-data:/var/lib/grafana
95depends_on:
96- prometheus
97networks:
98- app-network
99
100volumes:
101db-data:
102grafana-data:
103
104networks:
105app-network:
106driver: bridge
107