-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
38 lines (34 loc) · 828 Bytes
/
Copy pathdocker-compose.yml
File metadata and controls
38 lines (34 loc) · 828 Bytes
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
version: "3.4"
services:
build:
image: golang:1.16
command: ["bash", "-c", "cd /app/example && go build main.go"]
volumes:
- .:/app
example:
image: pgbroker-example:latest
build:
context: .
dockerfile: Dockerfile.example
depends_on:
- postgres
volumes:
- .:/pprof
postgres:
image: postgres:11-alpine
environment:
- POSTGRES_HOST_AUTH_METHOD=trust
pgbench:
image: postgres:11-alpine
command: ["bash", "-c", "
sleep 5 && \
pgbench -i -s 5 -h example -U postgres && \
echo && \
pgbench -T 10 -M simple -h example -U postgres && \
echo && \
pgbench -T 10 -M extended -h example -U postgres && \
echo && \
pgbench -T 10 -M prepared -h example -U postgres
"]
depends_on:
- example