@@ -3,10 +3,132 @@ services:
33 auth :
44 build : ' ./auth'
55 # Use image built from the Dockfile in /auth dir
6- container_name : ' users'
6+ container_name : ' auth'
7+
8+ ports :
9+ - ' 3000:3000'
10+
11+ volumes :
12+ - ' /var/run/docker.sock:/var/run/docker.sock'
13+ client :
14+ build : ' ./client'
15+ # Use image built from the Dockfile in /auth dir
16+ container_name : ' client'
717
818 ports :
919 - ' 5000:5000'
1020
1121 volumes :
1222 - ' /var/run/docker.sock:/var/run/docker.sock'
23+ items :
24+ build : ' ./items'
25+ # Use image built from the Dockfile in /auth dir
26+ container_name : ' items'
27+
28+ ports :
29+ - ' 3001:3001'
30+
31+ volumes :
32+ - ' /var/run/docker.sock:/var/run/docker.sock'
33+ inventory :
34+ build : ' ./inventory'
35+ # Use image built from the Dockfile in /auth dir
36+ container_name : ' inventory'
37+
38+ ports :
39+ - ' 3002:3002'
40+
41+ volumes :
42+ - ' /var/run/docker.sock:/var/run/docker.sock'
43+ orders :
44+ build : ' ./orders'
45+ # Use image built from the Dockfile in /auth dir
46+ container_name : ' orders'
47+
48+ ports :
49+ - ' 3003:3003'
50+
51+ volumes :
52+ - ' /var/run/docker.sock:/var/run/docker.sock'
53+ event-bus :
54+ build : ' ./event-bus'
55+ # Use image built from the Dockfile in /auth dir
56+ container_name : ' event-bus'
57+
58+ ports :
59+ - ' 3005:3005'
60+
61+ volumes :
62+ - ' /var/run/docker.sock:/var/run/docker.sock'
63+ nginx :
64+ # Use latest version of the public nginx image.
65+ image : nginx:latest
66+
67+ container_name : ' production_nginx'
68+
69+ ports :
70+ - ' 8000:8000'
71+
72+ volumes :
73+ - ' ./client:/srv/www/static'
74+ - ' ./default.conf:/etc/nginx/conf.d/default.conf'
75+
76+ depends_on :
77+ - client
78+ - auth
79+ - items
80+ - inventory
81+ - orders
82+ - event-bus
83+ cadvisor :
84+ image : gcr.io/cadvisor/cadvisor:latest
85+ container_name : cadvisor
86+ privileged : true
87+ # platform: linux/arm64/v8
88+ ports :
89+ - 8081:8081
90+ command :
91+ - ' -port=8081'
92+ volumes :
93+ - /:/rootfs:ro
94+ - /etc/machine-id:/etc/machine-id:ro
95+ - /var/run/docker.sock:/var/run/docker.sock:rw
96+ - /sys:/sys:ro
97+ - /var/lib/docker/:/var/lib/docker:ro
98+ depends_on :
99+ - client
100+ - auth
101+ - items
102+ - inventory
103+ - orders
104+ - event-bus
105+ prometheus :
106+ image : prom/prometheus:latest
107+ container_name : prometheus
108+ ports :
109+ - 9090:9090
110+ command :
111+ - --config.file=/etc/prometheus/prometheus.yml
112+ volumes :
113+ - ./prometheus.yml:/etc/prometheus/prometheus.yml:ro
114+
115+ depends_on :
116+ - cadvisor
117+
118+ grafana :
119+ image : grafana/grafana:latest
120+ container_name : grafana
121+ ports :
122+ - 32000:3000
123+ volumes :
124+ # Share the named volume with the grafana container
125+ - ./grafana/provisioning/datasources:/etc/grafana/provisioning/datasources
126+ - ./grafana/provisioning/dashboards:/etc/grafana/provisioning/dashboards
127+ environment :
128+ GF_PATHS_CONFIG : /etc/grafana/grafana.ini
129+ GF_SECURITY_ALLOW_EMBEDDING : ' true'
130+ depends_on :
131+ - prometheus
132+
133+ volumes :
134+ grafana-dir : {}
0 commit comments