Docker 安装 Gitea

安装

1
2
3
docker pull gitea/gitea:latest
sudo mkdir -p /data/software/gitea
docker run -d --name=gitea -p 10022:22 -p 10080:3000 -v /data/software/gitea:/data gitea/gitea:latest

参考文档: https://docs.gitea.io/zh-cn/install-with-docker/

Nginx 负载

1
2
3
4
5
6
7
8
9
10
server {
listen 80;
server_name git.demo.com git.demo.cc;
location / {
proxy_pass http://localhost:10080;
}

access_log /var/log/nginx/git.access.log;
error_log /var/log/nginx/git.error.log;
}

如果不是使用 docker-compose, nginx 需要开启 host 网络模式.

Donate - Support to make this site better.
捐助 - 支持我让我做得更好.