error-pages/docker-compose.yml

47 lines
1.2 KiB
YAML
Raw Normal View History

2021-09-29 15:38:50 +00:00
# Docker-compose file is used only for local development. This is not production-ready example.
version: '3.8'
2020-07-08 17:15:53 +00:00
volumes:
2021-09-29 15:38:50 +00:00
tmp-data: {}
golint-cache: {}
2020-07-08 17:15:53 +00:00
services:
2021-09-29 15:38:50 +00:00
app: &app-service
image: golang:1.17.5-buster # Image page: <https://hub.docker.com/_/golang>
2020-07-08 17:15:53 +00:00
working_dir: /src
environment:
HOME: /tmp
2021-09-29 15:38:50 +00:00
GOPATH: /tmp
2020-07-08 17:15:53 +00:00
volumes:
- /etc/passwd:/etc/passwd:ro
- /etc/group:/etc/group:ro
2021-09-29 15:38:50 +00:00
- .:/src:rw
- tmp-data:/tmp:rw
web:
<<: *app-service
ports:
- "8080:8080/tcp" # Open <http://127.0.0.1:8080>
command:
- go
- run
- ./cmd/error-pages
- serve
- --verbose
- --port=8080
healthcheck:
test: ['CMD', 'wget', '--spider', '-q', 'http://127.0.0.1:8080/health/live']
interval: 5s
timeout: 2s
golint:
image: golangci/golangci-lint:v1.42-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