go-binary-service.yaml 848 B

12345678910111213141516171819202122232425262728293031323334
  1. # process-compose.yaml — Go binary service
  2. #
  3. # Pattern: Fast-startup Go service with TCP probe.
  4. # Use HTTP probe if it serves HTTP; tcp_socket is the fallback for
  5. # protocols that aren't HTTP.
  6. version: "0.5"
  7. processes:
  8. mysvc:
  9. command: "X:/path/to/mysvc/bin/mysvc.exe serve"
  10. working_dir: "X:/path/to/mysvc"
  11. readiness_probe:
  12. http_get: # Use http_get if the service is HTTP
  13. host: localhost
  14. port: 8080
  15. path: /
  16. # OR for non-HTTP protocols:
  17. # tcp_socket:
  18. # host: localhost
  19. # port: 5432
  20. initial_delay_seconds: 1 # Go services usually come up in < 1s
  21. period_seconds: 5
  22. timeout_seconds: 3
  23. failure_threshold: 3
  24. availability:
  25. restart: always
  26. backoff_seconds: 10
  27. max_restarts: 10
  28. log_location: "logs/mysvc.log"