Skip to content

Commit 1e5a436

Browse files
committed
docs: 更新Docker部署文档和优化配置文件
重构DOCKER.md文档结构,简化内容并优化可读性 更新.env.example和docker-compose配置文件,添加中文注释 优化1Panel部署脚本,移除不必要功能并简化流程
1 parent 27357a0 commit 1e5a436

File tree

6 files changed

+339
-741
lines changed

6 files changed

+339
-741
lines changed

.DS_Store

-6 KB
Binary file not shown.

.env.example

Lines changed: 23 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,37 @@
11
# Environment Variables Template
22
# Copy this file to .env and fill in your actual values
33

4-
# Database Configuration
5-
POSTGRES_PASSWORD=your_secure_password_here
4+
# === 数据库配置 ===
5+
POSTGRES_PASSWORD=secure_password_change_me
66
POSTGRES_USER=postgres
77
POSTGRES_DB=Blog
8-
DATABASE_URL=postgres://postgres:your_secure_password_here@postgres:5432/Blog
8+
DATABASE_URL=postgres://postgres:secure_password_change_me@postgres:5432/Blog
9+
POSTGRES_PORT=5432
910

10-
# JWT Configuration
11-
JWT_SECRET=your_super_secret_jwt_key_change_this_in_production_with_minimum_32_characters
11+
# === JWT 配置 ===
12+
JWT_SECRET=your_super_secret_jwt_key_change_this_in_production
1213

13-
# API Configuration
14+
# === API 配置 ===
1415
PUBLIC_API_BASE_URL=http://localhost:8080/api
1516
INTERNAL_API_BASE_URL=http://backend:8080/api
17+
BACKEND_PORT=8080
1618

17-
# Frontend Configuration
19+
# === 前端配置 ===
1820
HOST=0.0.0.0
1921
PORT=4321
22+
FRONTEND_PORT=4321
23+
NODE_ENV=production
2024

21-
# CORS Configuration (comma-separated)
22-
ALLOWED_ORIGINS=http://localhost:4321,https://yourdomain.com,http://frontend:4321
25+
# === CORS 配置 ===
26+
ALLOWED_ORIGINS=http://localhost:4321,https://yourdomain.com
2327

24-
# Production Settings
25-
NODE_ENV=production
28+
# === Redis 配置 ===
29+
REDIS_PASSWORD=secure_redis_password
30+
31+
# === 日志配置 ===
32+
RUST_LOG=info
33+
RUST_BACKTRACE=0
34+
35+
# === SSL 配置 (生产环境) ===
36+
SSL_CERT_PATH=/etc/nginx/ssl/cert.pem
37+
SSL_KEY_PATH=/etc/nginx/ssl/key.pem

0 commit comments

Comments
 (0)