-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
185 lines (169 loc) · 4.01 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
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
x-app-resources: &x-app-resources
deploy:
resources:
reservations:
cpus: '1'
memory: 512M
limits:
cpus: '1'
memory: 512M
x-app-service-template: &ruby-app
image: ruby-with-nghttp2:0.1
build:
dockerfile: Dockerfile
environment:
DS9_USE_SYSTEM_LIBRARIES: "1"
HISTFILE: /app/tmp/.bash_history
BUNDLE_PATH: /usr/local/bundle
BUNDLE_CONFIG: /app/.bundle/config
prometheus_multiproc_dir: /tmp
stdin_open: true
tty: true
working_dir: /app
tmpfs:
- /tmp
services:
ruby:
<<:
- *ruby-app
- *x-app-resources
command: bash
volumes:
- bundler_data:/usr/local/bundle
- .:/app:cached
gruf:
<<:
- *ruby-app
- *x-app-resources
command: bundle exec ruby server.rb
volumes:
- ./gruf:/app:cached
- ./shared:/shared:cached
- bundler_data:/usr/local/bundle
griffin:
<<:
- *ruby-app
- *x-app-resources
command: bundle exec ruby server.rb
volumes:
- ./griffin:/app:cached
- ./shared:/shared:cached
- bundler_data:/usr/local/bundle
grpc:
<<:
- *ruby-app
- *x-app-resources
command: bundle exec ruby server.rb
volumes:
- ./grpc:/app:cached
- ./shared:/shared:cached
- bundler_data:/usr/local/bundle
grpc-multi:
<<:
- *ruby-app
- *x-app-resources
command: bundle exec ruby server_multi.rb
volumes:
- ./grpc:/app:cached
- ./shared:/shared:cached
- bundler_data:/usr/local/bundle
falcon:
<<:
- *ruby-app
- *x-app-resources
command: bundle exec falcon host
volumes:
- ./falcon:/app:cached
- ./shared:/shared:cached
- bundler_data:/usr/local/bundle
nginx:
build:
context: nginx
dockerfile: Dockerfile
args:
NGINX_VERSION: "1.27.2"
volumes:
- type: bind
source: ./nginx/nginx.conf
target: /etc/nginx/nginx.conf
depends_on:
- gruf
client:
<<: *ruby-app
command: bundle exec puma -t 8 -w 8 -C puma.rb
volumes:
- ./client-app:/app:cached
- ./shared:/shared:cached
- bundler_data:/usr/local/bundle
prometheus:
image: prom/prometheus:v2.17.1
container_name: prometheus
volumes:
- ./prometheus:/etc/prometheus
- prometheus_data:/prometheus
command:
- '--config.file=/etc/prometheus/prometheus.yml'
- '--storage.tsdb.path=/prometheus'
- '--web.console.libraries=/etc/prometheus/console_libraries'
- '--web.console.templates=/etc/prometheus/consoles'
- '--storage.tsdb.retention.time=200h'
- '--web.enable-lifecycle'
restart: unless-stopped
expose:
- 9090
depends_on:
- client
grafana:
image: grafana/grafana:11.2.2-security-01
container_name: grafana
volumes:
- grafana_data:/var/lib/grafana
- ./grafana/provisioning:/etc/grafana/provisioning
environment:
- GF_SECURITY_ADMIN_USER=admin
- GF_SECURITY_ADMIN_PASSWORD=password
- GF_USERS_ALLOW_SIGN_UP=false
restart: unless-stopped
expose:
- 3000
ports:
- "3000:3000"
depends_on:
- prometheus
k6:
image: grafana/k6
command: run /app/k6_test_grpc.js
profiles: [manual-run]
volumes:
- .:/app:cached
sysctls:
- net.ipv4.tcp_tw_reuse=1
grpcurl:
image: fullstorydev/grpcurl
profiles: [manual-run]
volumes:
- .:/app:cached
command: >
-plaintext -proto hello.proto -import-path /app/shared/proto -d '{"name": "Dmitry"}' gruf:9091 hello.Greeter/SayHello
rust-tonic:
image: rust-with-protobuf:0.2
build:
dockerfile: rust-tonic/Dockerfile
working_dir: /app/rust-tonic
environment:
CARGO_HOME: /usr/cargo
volumes:
- .:/app:cached
- cargo_data:/usr/cargo
command: >
cargo run
go-grpc:
image: go-grpc:0.1
build:
context: ./go-grpc
dockerfile: Dockerfile
volumes:
bundler_data:
cargo_data:
prometheus_data:
grafana_data: