- 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.
62 lines
1.5 KiB
Markdown
62 lines
1.5 KiB
Markdown
# Docker Compose 範例與配置
|
||
|
||
本目錄提供各種場景的 Docker Compose 範例配置。
|
||
|
||
---
|
||
|
||
## 範例檔案
|
||
|
||
| 檔案 | 用途 | 說明 |
|
||
| -------------------------------- | ------------ | ----------------- |
|
||
| `compose.minimal.example.yml` | 快速啟動 | 最精簡配置 |
|
||
| `compose.production.example.yml` | 生產環境 | 包含安全設定 |
|
||
| `compose.ocr-languages.yml` | OCR 語言擴展 | 安裝額外 OCR 語言 |
|
||
| `traefik.example.yml` | 反向代理 | Traefik 整合 |
|
||
| `nginx.example.conf` | Nginx 設定 | 反向代理設定範例 |
|
||
|
||
---
|
||
|
||
## 快速開始
|
||
|
||
### 最小配置(測試 / 個人使用)
|
||
|
||
```bash
|
||
# 1. 複製範例
|
||
cp compose.minimal.example.yml docker-compose.yml
|
||
|
||
# 2. 建立資料夾
|
||
mkdir -p data
|
||
|
||
# 3. 修改以下欄位:
|
||
# - JWT_SECRET(至少 32 字元隨機字串)
|
||
|
||
# 4. 啟動
|
||
docker compose up -d
|
||
```
|
||
|
||
### 生產環境配置
|
||
|
||
```bash
|
||
# 1. 複製範例
|
||
cp compose.production.example.yml docker-compose.yml
|
||
|
||
# 2. 建立資料夾
|
||
mkdir -p data
|
||
|
||
# 3. 修改以下欄位:
|
||
# - JWT_SECRET(至少 32 字元隨機字串)
|
||
# - TZ(時區,預設 Asia/Taipei)
|
||
|
||
# 4. 啟動
|
||
docker compose up -d
|
||
```
|
||
|
||
> 💡 產生隨機 JWT_SECRET:`openssl rand -hex 32`
|
||
|
||
---
|
||
|
||
## 相關文件
|
||
|
||
- [Docker 部署](../部署指南/Docker部署.md)
|
||
- [環境變數](../配置設定/環境變數.md)
|
||
- [反向代理](../部署指南/反向代理.md)
|