compose.yaml
| 1 | services: |
| 2 | server: |
| 3 | build: . |
| 4 | ports: |
| 5 | - "127.0.0.1:8080:8080" |
| 6 | environment: |
| 7 | OT_PUBLIC_URL: https://track.example.com |
| 8 | OT_RETENTION_DAYS: 30 |
| 9 | volumes: |
| 10 | - ./data:/data |
| 11 | # The image has no HTTP client, so bash talks HTTP itself. |
| 12 | healthcheck: |
| 13 | test: ["CMD", "bash", "-c", 'exec 3<>/dev/tcp/127.0.0.1/8080 && printf "GET /healthz HTTP/1.0\r\n\r\n" >&3 && head -1 <&3 | grep -q " 200 "'] |
| 14 | interval: 30s |
| 15 |