zhong (钟鹏群) 2 semanas atrás
pai
commit
63a6d203be
1 arquivos alterados com 8 adições e 4 exclusões
  1. 8 4
      deployments/gogs-deployment.yaml

+ 8 - 4
deployments/gogs-deployment.yaml

@@ -19,11 +19,15 @@ spec:
       - name: gogs
         image: registry.cn-hangzhou.aliyuncs.com/zhongpengqun/wanderer:linux-amd64-gogs-0.13
         ports:
-        - containerPort: 3000  # Gogs web interface
-        - containerPort: 22    # SSH port for Git operations
+        - containerPort: 3000
+        - containerPort: 22
         env:
+        # 关键1:HTTP_HOST=0.0.0.0 监听全网卡
+        - name: GOGS__server__HTTP_HOST
+          value: "0.0.0.0"
+        # 关键2:ROOT_URL换成你的域名,后续gogs内部跳转正常
         - name: GOGS__server__ROOT_URL
-          value: "http://localhost:3000"
+          value: "http://gogs2.9981.tech"
         - name: GOGS__database__DB_TYPE
           value: "sqlite3"
         - name: GOGS__database__PATH
@@ -72,4 +76,4 @@ spec:
     - ReadWriteOnce
   resources:
     requests:
-      storage: 5Gi
+      storage: 5Gi