mirror of
https://github.com/woodchen-ink/proxy-go.git
synced 2025-07-18 16:41:54 +08:00
- Updated docker-compose.yml to include resource limits and health checks for the service. - Modified go.mod and go.sum to include the new dependency on golang.org/x/time. - Enhanced main.go to add new metrics routes for monitoring. - Updated config.json to include metrics configuration with password and token expiry. - Refactored internal/config to implement a ConfigManager for dynamic configuration loading. - Improved internal/handler to utilize a shared HTTP client and added metrics tracking for requests.
24 lines
510 B
YAML
24 lines
510 B
YAML
services:
|
|
proxy:
|
|
image: woodchen/proxy-go:latest
|
|
container_name: proxy-go
|
|
ports:
|
|
- "3334:80"
|
|
volumes:
|
|
- ./data:/app/data
|
|
environment:
|
|
- TZ=Asia/Shanghai
|
|
restart: always
|
|
deploy:
|
|
resources:
|
|
limits:
|
|
cpus: '1'
|
|
memory: 512M
|
|
reservations:
|
|
cpus: '0.25'
|
|
memory: 128M
|
|
healthcheck:
|
|
test: ["CMD", "wget", "-q", "--spider", "http://localhost:80/"]
|
|
interval: 30s
|
|
timeout: 3s
|
|
retries: 3 |