# 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: 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 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.50-alpine # Image page: environment: GOLANGCI_LINT_CACHE: /tmp/golint # volumes: - .:/src:ro - golint-cache:/tmp/golint:rw working_dir: /src command: /bin/true hurl: image: orangeopensource/hurl:1.7.0 volumes: - .:/src:ro working_dir: /src depends_on: web: {condition: service_healthy}