mirror of
https://github.com/tarampampam/error-pages.git
synced 2024-08-30 18:22:40 +00:00
58 lines
1.4 KiB
YAML
58 lines
1.4 KiB
YAML
# 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.18-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:
|
|
- go
|
|
- run
|
|
- ./cmd/error-pages
|
|
- serve
|
|
- --verbose
|
|
- --port=8080
|
|
- --show-details
|
|
- --proxy-headers=X-Foo,Bar,Baz_blah
|
|
healthcheck:
|
|
test: ['CMD', 'wget', '--spider', '-q', 'http://127.0.0.1:8080/healthz']
|
|
interval: 5s
|
|
timeout: 2s
|
|
|
|
golint:
|
|
image: golangci/golangci-lint:v1.44-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.5.0
|
|
volumes:
|
|
- .:/src:ro
|
|
working_dir: /src
|
|
depends_on:
|
|
web:
|
|
condition: service_healthy
|