mirror of
https://github.com/Awuqing/BackupX.git
synced 2026-07-08 01:41:22 +08:00
feat: add Docker deployment support
- Multi-stage Dockerfile (Node build + Go build + Alpine runtime) - docker-compose.yml with named volume for data persistence - In-container Nginx reverse proxy (static files + API) - Entrypoint script for graceful process management - .dockerignore for optimized build context - Updated README (zh/en) with Docker quick start and deployment docs Closes #14
This commit is contained in:
21
docker-compose.yml
Normal file
21
docker-compose.yml
Normal file
@@ -0,0 +1,21 @@
|
||||
services:
|
||||
backupx:
|
||||
build: .
|
||||
image: backupx:latest
|
||||
container_name: backupx
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "8340:8340"
|
||||
volumes:
|
||||
- backupx-data:/app/data
|
||||
# Mount host directories that need to be backed up (example):
|
||||
# - /path/to/backup/source:/mnt/source:ro
|
||||
environment:
|
||||
- TZ=Asia/Shanghai
|
||||
# Override any config via BACKUPX_ prefixed env vars:
|
||||
# - BACKUPX_SERVER_PORT=8340
|
||||
# - BACKUPX_LOG_LEVEL=info
|
||||
# - BACKUPX_BACKUP_MAX_CONCURRENT=2
|
||||
|
||||
volumes:
|
||||
backupx-data:
|
||||
Reference in New Issue
Block a user