Docker一键建立Gitea(sqlite3)

date
Apr 25, 2022
slug
docker-gitea-sqlite
status
Published
summary
新服务 一键自建Gitea代码托管服务
tags
service
type
Post
URL

Summary

  • 不用mysql

步骤

cd /data
mkdir gitea; cd gitea

docker run -d \
  --restart always \
  --name=gitea \
  -p 11090:3000 \
  -p 11091:22 \
  -e TZ=Asia/Hong_Kong \
  -e USER_UID=1000 -e USER_GID=1000 \
  -v $(pwd)/data:/data \
  gitea/gitea:latest

打开http://ip:11090即可或者宝塔SSL + nginx反代

notion image
#在配置文件里添加
location / {
     proxy_pass http://localhost:11090
     proxy_redirect off;
     proxy_set_header X-Real-IP $remote_addr;
     proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    }

配置修改

notion image
notion image
notion image
 

验证

notion image

© Ying Bun 2021 - 2024