feat: deploy Gitea on HK node
This commit is contained in:
@@ -0,0 +1,17 @@
|
|||||||
|
# HK Gitea
|
||||||
|
|
||||||
|
Gitea target on the `bwh-hk-cmi` Arcane Environment.
|
||||||
|
|
||||||
|
- Web: `https://gitea.kais.cloud`
|
||||||
|
- Git SSH: `ssh://git@gitea.kais.cloud:222/<owner>/<repo>.git`
|
||||||
|
- Persistent data: `/opt/stacks/gitea/data`
|
||||||
|
- Shared reverse-proxy network: external Docker network `hk-web`
|
||||||
|
- Reverse proxy: Caddy in the existing `web-managed` project
|
||||||
|
|
||||||
|
The initial target deliberately uses Gitea `1.25.1`, matching the source on
|
||||||
|
Arcane Local Docker. Keep the source online and do not initialize unrelated
|
||||||
|
production data before the planned dump/restore cutover.
|
||||||
|
|
||||||
|
The Gitea data directory is not stored in Git. Back it up before upgrades and
|
||||||
|
before every migration attempt. Repository credentials, session secrets, and
|
||||||
|
the migrated `app.ini` remain only under `/opt/stacks/gitea/data`.
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
services:
|
||||||
|
gitea:
|
||||||
|
image: docker.gitea.com/gitea:1.25.1@sha256:7dff60d7ea6df9d0bdf78971cdb1350e9b7df3fda5f115c77afe12122887bd64
|
||||||
|
container_name: gitea-hk
|
||||||
|
restart: unless-stopped
|
||||||
|
environment:
|
||||||
|
USER_UID: "1000"
|
||||||
|
USER_GID: "1000"
|
||||||
|
GITEA__server__DOMAIN: gitea.kais.cloud
|
||||||
|
GITEA__server__ROOT_URL: https://gitea.kais.cloud/
|
||||||
|
GITEA__server__SSH_DOMAIN: gitea.kais.cloud
|
||||||
|
GITEA__server__SSH_PORT: "222"
|
||||||
|
GITEA__server__SSH_LISTEN_PORT: "22"
|
||||||
|
GITEA__server__LFS_START_SERVER: "true"
|
||||||
|
ports:
|
||||||
|
- "222:22"
|
||||||
|
volumes:
|
||||||
|
- /opt/stacks/gitea/data:/data
|
||||||
|
- /etc/timezone:/etc/timezone:ro
|
||||||
|
- /etc/localtime:/etc/localtime:ro
|
||||||
|
networks:
|
||||||
|
- hk-web
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD", "wget", "-q", "--spider", "http://127.0.0.1:3000/api/healthz"]
|
||||||
|
interval: 30s
|
||||||
|
timeout: 5s
|
||||||
|
retries: 5
|
||||||
|
start_period: 60s
|
||||||
|
logging:
|
||||||
|
driver: json-file
|
||||||
|
options:
|
||||||
|
max-size: 10m
|
||||||
|
max-file: "3"
|
||||||
|
|
||||||
|
networks:
|
||||||
|
hk-web:
|
||||||
|
external: true
|
||||||
|
name: hk-web
|
||||||
@@ -24,3 +24,7 @@ share.kais.cloud {
|
|||||||
api.opfo.xyz {
|
api.opfo.xyz {
|
||||||
reverse_proxy 100.100.130.66:1049
|
reverse_proxy 100.100.130.66:1049
|
||||||
}
|
}
|
||||||
|
|
||||||
|
gitea.kais.cloud {
|
||||||
|
reverse_proxy gitea-hk:3000
|
||||||
|
}
|
||||||
|
|||||||
@@ -4,5 +4,6 @@
|
|||||||
- 复用旧项目 `/opt/stacks/web` 下的持久化数据。
|
- 复用旧项目 `/opt/stacks/web` 下的持久化数据。
|
||||||
- Secret 仅存 Arcane `.env`:`WEBDAV_PASSWORD`。
|
- Secret 仅存 Arcane `.env`:`WEBDAV_PASSWORD`。
|
||||||
- HAProxy 使用 SNI passthrough 接管 TCP 443:`cmi-tls-a7f29c.opfo.xyz` 转发至 AnyTLS,`conn.opfo.xyz` 转发至 Trojan,其余连接转发至 Caddy。
|
- HAProxy 使用 SNI passthrough 接管 TCP 443:`cmi-tls-a7f29c.opfo.xyz` 转发至 AnyTLS,`conn.opfo.xyz` 转发至 Trojan,其余连接转发至 Caddy。
|
||||||
- Caddy HTTPS 仅发布在宿主机 `127.0.0.1:8443`,并关闭 HTTP/3,将 UDP 443 留给 Hysteria2。
|
- Caddy HTTPS 只在 Docker 网络内由 HAProxy 转发,宿主机另发布 HTTP 80;HTTP/3 已关闭,将 UDP 443 留给 Hysteria2。
|
||||||
|
- `gitea.kais.cloud` 由 Caddy 转发到共享外部网络 `hk-web` 上的 `gitea-hk:3000`;Gitea 本体属于独立 Git Sync 项目。
|
||||||
- `metacubexd` 与 `metube` 不迁移。
|
- `metacubexd` 与 `metube` 不迁移。
|
||||||
|
|||||||
@@ -28,6 +28,9 @@ services:
|
|||||||
- /opt/stacks/web/caddy/site:/srv
|
- /opt/stacks/web/caddy/site:/srv
|
||||||
- /opt/stacks/web/caddy/data:/data
|
- /opt/stacks/web/caddy/data:/data
|
||||||
- /opt/stacks/web/caddy/config:/config
|
- /opt/stacks/web/caddy/config:/config
|
||||||
|
networks:
|
||||||
|
- default
|
||||||
|
- hk-web
|
||||||
|
|
||||||
filebrowser:
|
filebrowser:
|
||||||
image: filebrowser/filebrowser:s6
|
image: filebrowser/filebrowser:s6
|
||||||
@@ -49,3 +52,8 @@ services:
|
|||||||
PASSWORD: ${WEBDAV_PASSWORD}
|
PASSWORD: ${WEBDAV_PASSWORD}
|
||||||
volumes:
|
volumes:
|
||||||
- /opt/stacks/web/dav:/media
|
- /opt/stacks/web/dav:/media
|
||||||
|
|
||||||
|
networks:
|
||||||
|
hk-web:
|
||||||
|
external: true
|
||||||
|
name: hk-web
|
||||||
|
|||||||
Reference in New Issue
Block a user