forked from tarampampam/error-pages
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
49 lines (43 loc) · 1.28 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
# Docker-compose file is used only for local development. This is not production-ready example.
version: '3.8'
volumes:
tmp-data: {}
golint-cache: {}
services:
app: &app-service
image: golang:1.19-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
web:
<<: *app-service
ports:
- "8080:8080/tcp" # Open <http://127.0.0.1:8080>
command: sh -c "go build -o /tmp/app ./cmd/error-pages && /tmp/app serve"
healthcheck:
test: ['CMD', '/tmp/app', 'healthcheck', '--log-json']
interval: 4s
timeout: 1s
start_period: 5s
golint:
image: golangci/golangci-lint:v1.49-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.42.0/internal/cache/default.go#L68>
volumes:
- .:/src:ro
- golint-cache:/tmp/golint:rw
working_dir: /src
command: /bin/true
hurl:
image: orangeopensource/hurl:1.6.1
volumes:
- .:/src:ro
working_dir: /src
depends_on:
web: {condition: service_healthy}