-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
161 lines (151 loc) · 3.67 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
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
version: '3'
services:
sample_migrator:
image: flyway/flyway:10.1
container_name: sample_flyway
command: -url=jdbc:mysql://db/sample_db?allowPublicKeyRetrieval=true -user=user -password=password -connectRetries=60 -connectRetriesInterval=2 migrate
volumes:
- ./data/migrations/sample:/flyway/sql
activity_migrator:
image: flyway/flyway:10.1
container_name: activity_flyway
command: -url=jdbc:postgresql://activitydb/activity_db?allowPublicKeyRetrieval=true -user=user -password=password -connectRetries=60 -connectRetriesInterval=2 migrate
volumes:
- ./data/migrations/activity:/flyway/sql
db:
platform: linux/x86_64
image: mysql:8
container_name: sample_db
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_USER: user
MYSQL_PASSWORD: password
MYSQL_DATABASE: sample_db
networks:
- default
volumes:
- ./build/mysql/lib:/var/lib/mysql
ports:
- "8086:3306"
activitydb:
platform: linux/x86_64
image: postgres:16
container_name: activity_db
environment:
MYSQL_ROOT_PASSWORD: root
POSTGRES_USER: user
POSTGRES_PASSWORD: password
POSTGRES_DB: activity_db
networks:
- default
volumes:
- ./build/postgresql/lib:/var/lib/postgresql
ports:
- "8087:5432"
pubsub:
image: google/cloud-sdk
container_name: sample_pubsub
command: gcloud beta emulators pubsub start --quiet --host-port=0.0.0.0:8085
environment:
- PUBSUB_PROJECT_ID=sample-go-app
ports:
- "8085:8085"
networks:
- default
extra_hosts:
- "host.docker.internal:host-gateway"
grafana:
image: grafana/grafana-enterprise
container_name: sample_grafana
ports:
- "3000:3000"
volumes:
- "./build/grafana/lib:/var/lib/grafana"
networks:
- default
depends_on:
prometheus:
condition: service_started
jaeger:
condition: service_started
prometheus:
image: prom/prometheus
container_name: sample_prometheus
ports:
- "9090:9090"
volumes:
- ./build/prometheus:/etc/prometheus
command:
- '--config.file=/etc/prometheus/prometheus.yml'
extra_hosts:
- "host.docker.internal:host-gateway"
depends_on:
sample:
condition: service_started
networks:
- default
links:
- sample
jaeger:
image: jaegertracing/all-in-one
container_name: sample_jaeger
ports:
- "16686:16686"
- "4318:4318"
environment:
- COLLECTOR_OTLP_ENABLED=true
sample:
build:
context: ./
dockerfile: Dockerfile.sample
container_name: sample_app
ports:
- "8080:8080"
volumes:
- ./:/app
links:
- db
- jaeger
networks:
- default
depends_on:
db:
condition: service_started
jaeger:
condition: service_started
activity:
build:
context: ./
dockerfile: Dockerfile.activity
container_name: activity_app
ports:
- "8081:8080"
volumes:
- ./:/app
links:
- activitydb
- jaeger
networks:
- default
depends_on:
db:
condition: service_started
jaeger:
condition: service_started
traefik:
image: traefik:v2.10
container_name: sample_traefik
command:
- "--api.dashboard=true"
- "--api.insecure=true"
- "--providers.http=true"
- "--entrypoints.web.address=:80"
- "--log.level=INFO"
ports:
- "80:80"
- "8082:8080"
networks:
- default
volumes:
- ./build/traefik/traefik.yml:/etc/traefik/traefik.yml
- ./build/traefik/http.yml:/etc/traefik/config/http.yml