| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475 |
- apiVersion: apps/v1
- kind: Deployment
- metadata:
- name: gogs
- namespace: nginx-app
- labels:
- app: gogs
- spec:
- replicas: 1
- selector:
- matchLabels:
- app: gogs
- template:
- metadata:
- labels:
- app: gogs
- spec:
- containers:
- - 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
- env:
- - name: GOGS__server__ROOT_URL
- value: "http://localhost:3000"
- - name: GOGS__database__DB_TYPE
- value: "sqlite3"
- - name: GOGS__database__PATH
- value: "/data/gogs.db"
- volumeMounts:
- - name: gogs-data
- mountPath: /data
- resources:
- requests:
- memory: "256Mi"
- cpu: "250m"
- limits:
- memory: "512Mi"
- cpu: "1000m"
- volumes:
- - name: gogs-data
- persistentVolumeClaim:
- claimName: gogs-pvc
- ---
- apiVersion: v1
- kind: Service
- metadata:
- name: gogs-service
- namespace: nginx-app
- labels:
- app: gogs
- spec:
- selector:
- app: gogs
- ports:
- - name: http
- port: 3000
- targetPort: 3000
- - name: ssh
- port: 22
- targetPort: 22
- type: ClusterIP
- ---
- apiVersion: v1
- kind: PersistentVolumeClaim
- metadata:
- name: gogs-pvc
- namespace: nginx-app
- spec:
- accessModes:
- - ReadWriteOnce
- resources:
- requests:
- storage: 5Gi
|