-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
137 lines (126 loc) · 3.17 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
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
# version: '3.8'
services:
netcore1:
hostname: netcore1
build: ./app/
restart: always
environment:
- OTLP_ENDPOINT_URL=http://olgtm:4317
labels:
- logging=promtail
# logging:
# driver: loki
# options:
# loki-url: https://<username>:<api-key>@logs-prod-us-central1.grafana.net/api/prom/push
networks:
- mynetwork
netcore2:
hostname: netcore2
image: aspnetcore-metrics-learning-netcore1:latest
restart: always
environment:
- OTLP_ENDPOINT_URL=http://olgtm:4317
labels:
- logging=promtail
depends_on:
- netcore1
networks:
- mynetwork
netcore3:
hostname: netcore3
image: aspnetcore-metrics-learning-netcore1:latest
restart: always
environment:
- OTLP_ENDPOINT_URL=http://olgtm:4317
labels:
- logging=promtail
depends_on:
- netcore1
networks:
- mynetwork
olgtm:
container_name: olgtm
image: grafana/otel-lgtm
ports:
- 3000:3000 # grafana (admin, admin)
- 9090:9090 # prometheus
- 4318:4318 # collector http
- 4317:4317 # collector grp
networks:
- mynetwork
jenkins:
container_name: jenkins
image: jenkins/jenkins:lts
privileged: true
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./jenkins/jenkins_home/:/var/jenkins_home/
networks:
- mynetwork
nginx:
image: nginx:latest
restart: always
ports:
- 80:80
networks:
- mynetwork
volumes:
- ./nginx/nginx.conf:/etc/nginx/nginx.conf
## for this container (sonarqube), require execute this command on host machine:
## sudo sysctl -w vm.max_map_count=262144
sonarqube:
container_name: sonarqube
image: sonarqube:8-community
depends_on:
- postgres-db
environment:
SONAR_JDBC_URL: jdbc:postgresql://postgres-db/sonarqube
SONAR_JDBC_USERNAME: sonar
SONAR_JDBC_PASSWORD: sonar
volumes:
- sonarqube_data:/opt/sonarqube/data
- sonarqube_extensions:/opt/sonarqube/extensions
- sonarqube_logs:/opt/sonarqube/logs
- sonarqube_temp:/opt/sonarqube/temp
networks:
- mynetwork
promtail-agent:
container_name: promtail-agent
image: grafana/promtail:latest
volumes:
- ./promtail/promtail-config.yaml:/etc/promtail/config.yml
- /var/lib/docker/containers:/var/lib/docker/containers:ro
- /var/run/docker.sock:/var/run/docker.sock
environment:
LOKI_USERNAME: admin
LOKI_PASSWORD: gatewayzin-loki
command: ["-config.file=/etc/promtail/config.yml", "-config.expand-env=true"]
networks:
- mynetwork
postgres-db:
container_name: postgres-test
image: postgres
restart: always
environment:
POSTGRES_USER: admin
POSTGRES_PASSWORD: admin
volumes:
- /var/lib/postgresql/data:/var/lib/postgresql/data
networks:
- mynetwork
adminer:
container_name: adminer-test
image: adminer
restart: always
environment:
ADMINER_DESIGN: galkaev
networks:
- mynetwork
networks:
mynetwork:
driver: bridge
volumes:
sonarqube_data:
sonarqube_extensions:
sonarqube_logs:
sonarqube_temp: