Initial commit: SMS Forwarder project with Docker support
This commit is contained in:
46
docker-compose.yml
Normal file
46
docker-compose.yml
Normal file
@ -0,0 +1,46 @@
|
||||
version: '3.8'
|
||||
|
||||
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:
|
||||
- "8080:80"
|
||||
volumes:
|
||||
- gotify_data:/app/data
|
||||
environment:
|
||||
- GOTIFY_DEFAULTUSER_PASS=admin
|
||||
restart: unless-stopped
|
||||
profiles:
|
||||
- gotify
|
||||
|
||||
volumes:
|
||||
gotify_data:
|
Reference in New Issue
Block a user