From d43a51a2120b20e89386119af3be4766007d92a5 Mon Sep 17 00:00:00 2001 From: qxsugar Date: Thu, 12 Dec 2024 16:37:00 +0800 Subject: [PATCH] updated: 2024-12-12 16:37:00 --- devops/gitea/docker-compose.yaml | 19 +++++++++++++ devops/gitea/ingress.yaml | 46 ++++++++++++++++++++++++++++++++ 2 files changed, 65 insertions(+) create mode 100644 devops/gitea/docker-compose.yaml create mode 100644 devops/gitea/ingress.yaml diff --git a/devops/gitea/docker-compose.yaml b/devops/gitea/docker-compose.yaml new file mode 100644 index 0000000..b30f743 --- /dev/null +++ b/devops/gitea/docker-compose.yaml @@ -0,0 +1,19 @@ +version: "3" +services: + server: + image: ccr.ccs.tencentyun.com/wwww/public-app:gitea-1.21.1 + container_name: gitea + environment: + - USER_UID=1000 + - USER_GID=1000 + - DISABLE_REGISTRATION=true + restart: always + volumes: + - ./gitea:/data + - /etc/timezone:/etc/timezone:ro + - /etc/localtime:/etc/localtime:ro + ports: + - "3000:3000" + - "222:22" + mem_limit: 2g + cpus: 1.0 \ No newline at end of file diff --git a/devops/gitea/ingress.yaml b/devops/gitea/ingress.yaml new file mode 100644 index 0000000..274afd2 --- /dev/null +++ b/devops/gitea/ingress.yaml @@ -0,0 +1,46 @@ +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: juno-gitea + annotations: + cert-manager.io/cluster-issuer: letsencrypt-prod +spec: + tls: + - hosts: + - gitea.lingpaike.com + secretName: gitea.lingpaike.com + rules: + - host: gitea.lingpaike.com + http: + paths: + - pathType: Prefix + path: "/" + backend: + service: + name: juno-gitea + port: + number: 80 +--- +apiVersion: v1 +kind: Service +metadata: + name: juno-gitea +spec: + ports: + - name: http + port: 80 + protocol: TCP + targetPort: http + +--- +apiVersion: v1 +kind: Endpoints +metadata: + name: juno-gitea +subsets: + - addresses: + - ip: 172.17.0.6 + ports: + - name: http + port: 3000 + protocol: TCP \ No newline at end of file