linux:gogs
这是本文档旧的修订版!
Gogs
Gogs是基于Go语言的自助Git服务,使用它可以快速搭建一个类似与GitHub的Git仓库托管服务。类似的服务有GitLab。
官方提供了二进制、Docker、Vagrant,以及包管理器等安装方式。得益于Golang的跨平台性,Gogs能跑在RaspberryPi上
Install
1. 下载编译好的二进制包;
2. 如果数据库使用的是PostgreSQL或者MySQL,则安装对应的数据库;
3. 使用Supervisord管理gogs进程;
[program:gogs] directory=/home/git/gogs/ command=/home/git/go/gogs/gogs web autostart=true autorestart=true startsecs=10 stdout_logfile=/var/log/gogs/stdout.log stdout_logfile_maxbytes=1MB stdout_logfile_backups=10 stdout_capture_maxbytes=1MB stderr_logfile=/var/log/gogs/stderr.log stderr_logfile_maxbytes=1MB stderr_logfile_backups=10 stderr_capture_maxbytes=1MB environment = HOME="/home/git", USER="git" user = git
4. 重启supervisor进程。
sudo systemctl supervisord restart
Upgrade
- 下载最新版的压缩包;
- 删除当前的 templates 目录;
- 解压压缩包并将所有内容复制粘贴到相应(当前)的位置。
Reference
linux/gogs.1457086190.txt.gz · 最后更改: 2023/12/03 10:24 (外部编辑)