- 修复Dockerfile缺少uv.lock和README.md文件的问题 - 更新.dockerignore以正确包含README.md文件 - 优化docker-compose.yml配置 - 更新部署文档 - 添加Docker快速启动指南
43 lines
918 B
YAML
43 lines
918 B
YAML
|
|
services:
|
|
sms-forwarder:
|
|
build: .
|
|
container_name: sms-forwarder
|
|
ports:
|
|
- "12152:12152"
|
|
volumes:
|
|
- ./config.yaml:/app/config.yaml:ro
|
|
- ./logs:/app/logs
|
|
- ./data:/app/data
|
|
environment:
|
|
- CONFIG_PATH=/app/config.yaml
|
|
restart: unless-stopped
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-f", "http://localhost:12152/health"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 40s
|
|
deploy:
|
|
resources:
|
|
limits:
|
|
memory: 256M
|
|
cpus: '0.5'
|
|
reservations:
|
|
memory: 128M
|
|
cpus: '0.1'
|
|
|
|
# 可选:添加 Gotify 服务作为推送后端
|
|
gotify:
|
|
image: gotify/server
|
|
container_name: gotify
|
|
ports:
|
|
- "24545:80"
|
|
volumes:
|
|
- ./gotify_data:/app/data
|
|
environment:
|
|
- GOTIFY_DEFAULTUSER_PASS=admin
|
|
restart: unless-stopped
|
|
profiles:
|
|
- gotify
|