如果您是第一次阅读该系列文章,建议优先阅读 Docker 部署项目说明及索引
前置操作
提前创建好 Gogs 的数据库,Gogs 支持 MySQL、PostgreSQL、SQLite3 或 TiDB(MySQL 协议)数据库。
Docker Compose
|
|
使用 Gogs
打开链接: http://localhost:3000 按指引安装配置 Gogs 即可。
NPM 反向代理配置
此处以 https://gogs.example.com 为例
如果未部署 NPM,可参考文章:使用 Docker 部署 Nginx Proxy Manager
Details
- Domain Names:
gogs.example.com - Scheme:
http - Forward Hostname/IP:
127.0.0.1(如果 NPM 未使用 HOST,则使用容器的 hostname:gogs) - Forward Port:
3000 - Cache Assets: ✅
SSL
- 选择你已经配置好的 SSL Certificate,如
*.example.com, example.com - Force SSL: ✅
- HTTP/2 Support: ✅
Advanced
|
|