forked from tarampampam/webhook-tester
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
69 lines (63 loc) · 1.72 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
# Docker-compose file is used only for local development. This is not production-ready example.
version: '3.4'
volumes:
tmp-data: {}
redis-data: {}
golint-cache: {}
services:
app: &app-service
image: golang:1.18.0-buster # Image page: <https://hub.docker.com/_/golang>
working_dir: /src
environment:
HOME: /tmp
GOPATH: /tmp
volumes:
- /etc/passwd:/etc/passwd:ro
- /etc/group:/etc/group:ro
- .:/src:rw
- tmp-data:/tmp:rw
depends_on:
redis:
condition: service_healthy
web:
<<: *app-service
ports:
- 8080:8080/tcp # Open <http://127.0.0.1:8080>
command:
- go
- run
- ./cmd/webhook-tester
- serve
- --verbose
- --port=8080
- --public=./web
- --storage-driver=redis
- --pubsub-driver=redis
- --redis-dsn=redis://redis:6379/0
- --max-requests=12
- --ignore-header-prefix=foo
- --ws-max-clients=20
- --ws-max-lifetime=1m
healthcheck:
test: ['CMD-SHELL', 'wget --spider -q http://127.0.0.1:8080/live']
interval: 5s
timeout: 2s
redis:
image: redis:6.0.9-alpine # Image page: <https://hub.docker.com/_/redis>
volumes:
- redis-data:/data:rw
ports:
- 6379/tcp
healthcheck:
test: ['CMD-SHELL', 'redis-cli ping']
interval: 1s
timeout: 2s
golint:
image: golangci/golangci-lint:v1.39-alpine # Image page: <https://hub.docker.com/r/golangci/golangci-lint>
environment:
GOLANGCI_LINT_CACHE: /tmp/golint # <https://github.com/golangci/golangci-lint/blob/v1.33.0/internal/cache/default.go#L68>
volumes:
- .:/src:ro
- golint-cache:/tmp/golint:rw
working_dir: /src
command: /bin/true