2021-09-29 15:38:50 +00:00
|
|
|
# Docker-compose file is used only for local development. This is not production-ready example.
|
|
|
|
|
2021-10-20 13:32:56 +00:00
|
|
|
version: '3.8'
|
2020-07-08 17:15:53 +00:00
|
|
|
|
|
|
|
volumes:
|
2021-09-29 15:38:50 +00:00
|
|
|
tmp-data: {}
|
2023-02-23 17:50:35 +00:00
|
|
|
golint-go: {}
|
2021-09-29 15:38:50 +00:00
|
|
|
golint-cache: {}
|
2020-07-08 17:15:53 +00:00
|
|
|
|
|
|
|
services:
|
2023-09-03 16:16:50 +00:00
|
|
|
app: &go
|
|
|
|
build: {target: builder}
|
2020-07-08 17:15:53 +00:00
|
|
|
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
|
2023-02-23 17:50:35 +00:00
|
|
|
security_opt: [no-new-privileges:true]
|
2021-09-29 15:38:50 +00:00
|
|
|
|
|
|
|
web:
|
2023-09-03 16:16:50 +00:00
|
|
|
<<: *go
|
2021-09-29 15:38:50 +00:00
|
|
|
ports:
|
|
|
|
- "8080:8080/tcp" # Open <http://127.0.0.1:8080>
|
2023-09-01 06:17:11 +00:00
|
|
|
command: sh -c "go build -buildvcs=false -o /tmp/app ./cmd/error-pages && /tmp/app serve --show-details --proxy-headers=X-Foo,Bar,Baz_blah --catch-all"
|
2021-09-29 15:38:50 +00:00
|
|
|
healthcheck:
|
2023-01-29 11:56:58 +00:00
|
|
|
test: ['CMD', '/tmp/app', '--log-json', 'healthcheck']
|
2022-06-12 07:55:49 +00:00
|
|
|
interval: 4s
|
|
|
|
start_period: 5s
|
2023-02-23 17:50:35 +00:00
|
|
|
retries: 5
|
2021-09-29 15:38:50 +00:00
|
|
|
|
|
|
|
golint:
|
2024-05-27 19:51:34 +00:00
|
|
|
image: golangci/golangci-lint:v1.59-alpine # Image page: <https://hub.docker.com/r/golangci/golangci-lint>
|
2021-09-29 15:38:50 +00:00
|
|
|
environment:
|
|
|
|
GOLANGCI_LINT_CACHE: /tmp/golint # <https://github.com/golangci/golangci-lint/blob/v1.42.0/internal/cache/default.go#L68>
|
|
|
|
volumes:
|
2023-02-23 17:50:35 +00:00
|
|
|
- golint-go:/go:rw # go dependencies will be downloaded on each run without this
|
2021-09-29 15:38:50 +00:00
|
|
|
- golint-cache:/tmp/golint:rw
|
2023-02-23 17:50:35 +00:00
|
|
|
- .:/src:ro
|
2021-09-29 15:38:50 +00:00
|
|
|
working_dir: /src
|
2023-02-23 17:50:35 +00:00
|
|
|
security_opt: [no-new-privileges:true]
|
2022-01-27 12:29:49 +00:00
|
|
|
|
|
|
|
hurl:
|
2024-04-27 10:52:16 +00:00
|
|
|
image: ghcr.io/orange-opensource/hurl:4.3.0
|
2022-01-27 12:29:49 +00:00
|
|
|
volumes:
|
|
|
|
- .:/src:ro
|
|
|
|
working_dir: /src
|
|
|
|
depends_on:
|
2022-06-12 07:55:49 +00:00
|
|
|
web: {condition: service_healthy}
|
2023-02-23 17:50:35 +00:00
|
|
|
security_opt: [no-new-privileges:true]
|