2025-06-23 11:38:18 +08:00

36 lines
841 B
Markdown
Raw Permalink 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.

# Ghost 博客 Docker Compose 配置
使用 Ghost 5 + Caddy 反向代理的简化博客部署方案。
## 🚀 架构说明
- **Ghost 5**:博客主程序,使用内置 SQLite 数据库
- **Caddy**:现代化 Web 服务器和反向代理,支持自动 HTTPS
- **Host 网络模式**Caddy 使用 host 网络,直接暴露端口到主机
## 快速开始
### 1. 启动服务
```bash
docker-compose up -d
```
### 环境变量
| 变量名 | 默认值 | 描述 |
| ------------ | ---------------- | -------------------- |
| `GHOST_URL` | http://localhost | Ghost 博客的访问地址 |
| `NODE_ENV` | production | Ghost 运行环境 |
### 域名配置
如果您有自己的域名,可以:
1. 修改 `.env` 文件:
```env
GHOST_URL=https://example.com
NODE_ENV=production
```