convertor/docs/範例配置/compose.production.example.yml
Your Name 8a84caa503 Refactor Docker Compose examples and documentation
- Updated README.md to include new example files for minimal and production configurations with detailed instructions.
- Added compose.production-alt.example.yml for an annotated production setup.
- Introduced new example files: compose.minimal.example.yml, compose.production.example.yml, nginx.example.conf, and traefik.example.yml for better clarity and usability.
- Removed outdated configuration files and consolidated documentation for OCR language support.
- Adjusted Nginx and Traefik configurations to reflect best practices and added necessary comments for user guidance.
- Minor formatting and consistency improvements across documentation files.
2026-01-24 00:36:58 +08:00

56 lines
1.4 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# ConvertX-CN 生產環境配置
# 適用於:正式部署(搭配反向代理)
#
# 使用方式:
# 1. cp compose.production.example.yml docker-compose.yml
# 2. mkdir -p data
# 3. 修改 JWT_SECRET必填
# 4. docker compose up -d
#
# 必須修改的欄位:
# - JWT_SECRET
services:
convertx:
image: convertx/convertx-cn:latest
container_name: convertx-cn
restart: unless-stopped
ports:
- "127.0.0.1:3000:3000" # 只允許本機存取,透過反向代理對外
volumes:
- ./data:/app/data
environment:
# ⚠️ 必填:請更換為長且隨機的字串(至少 32 字元)
# 產生方式openssl rand -hex 32
- JWT_SECRET=YOUR_JWT_SECRET_HERE
# 時區
- TZ=Asia/Taipei
# 安全性設定
- HTTP_ALLOWED=false # 禁止 HTTP使用 HTTPS
- TRUST_PROXY=true # 信任反向代理
- ACCOUNT_REGISTRATION=false # 關閉公開註冊
# 清理設定
- AUTO_DELETE_EVERY_N_HOURS=24
deploy:
resources:
limits:
memory: 4G
reservations:
memory: 2G
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3000/healthcheck"]
interval: 30s
timeout: 10s
retries: 3
start_period: 60s
logging:
driver: json-file
options:
max-size: "10m"
max-file: "3"