-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose-dev.yml
116 lines (108 loc) · 3.18 KB
/
docker-compose-dev.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
# Docker Compose for entire Full Stack Application running on localhost with locally built Docker Containers
version: '3.3'
services:
# App backend service
movieland-spring-admin:
container_name: movieland-spring-admin
build:
context: movieland-spring-admin
dockerfile: Dockerfile
image: movieland-spring-admin
ports:
- "8081:8081"
environment:
PORT: 8081
network_mode: host
# Frontend Service
movieland-frontend:
container_name: movieland-frontend
build:
context: movieland-frontend
dockerfile: Dockerfile
image: movieland-frontend
ports:
- "4000:4000"
environment:
PORT: 4000
network_mode: host
# Database Service (Postgresql)
# movieland-db:
# container_name: movieland-db
# image: 'postgres:13.1-alpine'
# ports:
# - "5432:5432"
# environment:
# - POSTGRES_USER=movielandadmin
# - POSTGRES_PASSWORD=movielandadmin
# - POSTGRES_DB=movieland_db
# volumes:
# - db-data:/var/lib/postgresql/data
movieland-prometheus:
image: prom/prometheus:v2.41.0
container_name: prometheus
restart: unless-stopped
volumes:
- ./monitoring/prometheus/prometheus-dev.yml:/etc/prometheus/prometheus.yml
ports:
- "9090:9090"
healthcheck:
test: [ "CMD", "nc", "-z", "localhost", "9090" ]
extra_hosts:
- "host.docker.internal:host-gateway"
network_mode: host
movieland-grafana:
image: grafana/grafana:9.3.2
container_name: grafana
restart: unless-stopped
ports:
- "3000:3000"
environment:
GF_SECURITY_ADMIN_USER: admin
GF_SECURITY_ADMIN_PASSWORD: admin
PROMETHEUS_SERVER: http://localhost:9090
TEMPO_SERVER: http://localhost:3200
LOKI_SERVER: http://localhost:3100
volumes:
- ./monitoring/grafana/provisioning:/etc/grafana/provisioning
depends_on:
- movieland-prometheus
healthcheck:
test: [ "CMD", "nc", "-z", "localhost", "3000" ]
user: "1000"
network_mode: host
movieland-promtail:
image: grafana/promtail:2.7.1
container_name: promtail
volumes:
- ./monitoring/promtail/promtail-dev.yml:/etc/promtail/promtail.yml
command: -config.file=/etc/promtail/promtail.yml
network_mode: host
# Source: https://github.com/marcingrzejszczak/observability-boot-blog-post
movieland-tempo:
container_name: tempo
image: grafana/tempo:1.5.0
command: [ "-config.file=/etc/tempo.yaml" ]
volumes:
- ./monitoring/tempo/tempo-local.yaml:/etc/tempo.yaml:ro
- tempo-data:/tmp/tempo
ports:
- "14268" # jaeger ingest
- "9411:9411" # zipkin
network_mode: host
movieland-loki:
container_name: loki
image: grafana/loki:2.7.1
command: [ "-config.file=/etc/loki/local-config.yaml", "-server.grpc-listen-port=9097" ]
ports:
- "3100:3100" # loki needs to be exposed so it receives logs
environment:
- JAEGER_AGENT_HOST=tempo
- JAEGER_ENDPOINT=http://localhost:14268/api/traces # send traces to Tempo
- JAEGER_SAMPLER_TYPE=const
- JAEGER_SAMPLER_PARAM=1
network_mode: host
# Volumes
volumes:
db-data:
tempo-data:
promtail-data: