mirror of
https://github.com/woodchen-ink/random-api-go.git
synced 2025-07-18 05:42:01 +08:00
- Updated docker-compose.yml to mount logs directory. - Changed BASE_URL environment variable to point to the new API endpoint. - Refactored main.go to implement a structured App type, improving initialization and graceful shutdown. - Enhanced config management with JSON loading and environment variable support. - Added monitoring capabilities in api_handler for logging request metrics. - Introduced new metrics display in index.html with corresponding CSS styles for better visualization.
15 lines
371 B
YAML
15 lines
371 B
YAML
services:
|
|
random-api-go:
|
|
container_name: random-api-go
|
|
image: woodchen/random-api-go:latest
|
|
ports:
|
|
- "5003:5003"
|
|
volumes:
|
|
- ./public:/root/public
|
|
- ./logs:/var/log/random-api
|
|
- ./data:/root/data
|
|
environment:
|
|
- TZ=Asia/Shanghai
|
|
- BASE_URL=https://github-file.czl.net/random-api.czl.net
|
|
restart: unless-stopped
|