vps 2021 年 3 月 25 日

vps搭建gogs服务

vps搭建gogs服务
甲骨文arm服务器,已有docker-compose服务,记录为主

配置caddy

wget -O caddy.deb https://github.com/caddyserver/caddy/releases/download/v2.4.6/caddy_2.4.6_linux_arm64.deb
dpkg -i caddy.deb
cat <<EOF >/etc/caddy/Caddyfile
ex.com {
  reverse_proxy 127.0.0.1:10880
}
EOF
systemctl restart caddy
systemctl status caddy

配置gogs

docker rm -f gogs
rm -rf /var/gogs
mkdir -p /var/gogs
docker run -d --restart always --name=gogs -p 22:22 -p 127.0.0.1:10880:3000 -v /var/gogs:/data gogs/gogs

使用

ssh-keygen
git clone [email protected]:username/examples.git