forked from go-park-mail-ru/2022_1_SamoeKrNaz
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
95 lines (87 loc) · 2.02 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
version: "3"
services:
go-docker:
build:
context: .
dockerfile: ./Dockerfile-server
depends_on:
- postgres
- session
- user_microservice
ports:
- "8080:8080"
volumes:
- ./:/server
- ./avatars:/server/avatars
- ./img_boards:/server/img_boards
postgres:
image: postgres:latest
environment:
POSTGRES_DB: ${POSTGRES_DB}
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
ports:
- "5432:5432"
volumes:
- ./db_postgres:/var/lib/postgresql/data
redis:
image: redis:latest
ports:
- "6379:6379"
volumes:
- ./sessions:/var/lib/redis
session:
build:
context: .
dockerfile: ./Dockerfile-session
container_name: "2022_1_samoekrnaz_session_1"
depends_on:
- redis
ports:
- "8081:8081"
- "8082:8082"
volumes:
- ./:/session
user_microservice:
build:
context: .
dockerfile: Dockerfile-user
container_name: "2022_1_samoekrnaz_user_microservice_1"
depends_on:
- session
ports:
- "8083:8083"
- "8084:8084"
volumes:
- ./:/user
prometheus:
image: "prom/prometheus"
ports:
- "9090:9090"
depends_on:
- nodeexporter
volumes:
- ./metrics/:/etc/prometheus/
command:
- "--config.file=/etc/prometheus/prometheus.yml"
grafana:
image: "grafana/grafana-enterprise"
depends_on:
- prometheus
volumes:
- ./grafana_data:/var/lib/grafana
ports:
- "3030:3000"
nodeexporter:
image: prom/node-exporter
volumes:
- /proc:/host/proc:ro
- /sys:/host/sys:ro
- /:/rootfs:ro
command:
- '--path.procfs=/host/proc'
- '--path.rootfs=/rootfs'
- '--path.sysfs=/host/sys'
- '--collector.filesystem.ignored-mount-points=^/(sys|proc|dev|host|etc|rootfs/var/lib/docker/containers|rootfs/var/lib/docker/overlay2|rootfs/run/docker/netns|rootfs/var/lib/docker/aufs)($$|/)'
ports:
- "9100:9100"