# Docker-compose file is used only for local development. This is not production-ready example. version: '3.4' volumes: tmp-data: {} golint-cache: {} services: app: &app-service image: golang:1.17.1-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: - 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: environment: GOLANGCI_LINT_CACHE: /tmp/golint # volumes: - .:/src:ro - golint-cache:/tmp/golint:rw working_dir: /src command: /bin/true