From fd9695d1700d54185ac9c77b4733c31ad06c0a03 Mon Sep 17 00:00:00 2001 From: abearxiong Date: Thu, 8 Jan 2026 01:38:48 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=20openlist=20=E6=9C=8D?= =?UTF-8?q?=E5=8A=A1=E7=9A=84=20Docker=20Compose=20=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E5=92=8C=20Kubernetes=20=E9=83=A8=E7=BD=B2=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../apps/openlist/docker/compose.yml | 13 ++++ k8s/kevisual.cn/apps/openlist/openlist.yaml | 71 +++++++++++++++++++ k8s/kevisual.cn/docs/02-查看启动.md | 6 ++ 3 files changed, 90 insertions(+) create mode 100644 k8s/kevisual.cn/apps/openlist/docker/compose.yml create mode 100644 k8s/kevisual.cn/apps/openlist/openlist.yaml create mode 100644 k8s/kevisual.cn/docs/02-查看启动.md diff --git a/k8s/kevisual.cn/apps/openlist/docker/compose.yml b/k8s/kevisual.cn/apps/openlist/docker/compose.yml new file mode 100644 index 0000000..5016a00 --- /dev/null +++ b/k8s/kevisual.cn/apps/openlist/docker/compose.yml @@ -0,0 +1,13 @@ +# docker-compose.yml +services: + openlist: + image: 'openlistteam/openlist:latest' + container_name: openlist + user: '0:0' # Please replace `0:0` with the actual user ID and group ID you want to use to run OpenList. + volumes: + - './data:/opt/openlist/data' + ports: + - '5244:5244' + environment: + - UMASK=022 + restart: unless-stopped \ No newline at end of file diff --git a/k8s/kevisual.cn/apps/openlist/openlist.yaml b/k8s/kevisual.cn/apps/openlist/openlist.yaml new file mode 100644 index 0000000..ec46a06 --- /dev/null +++ b/k8s/kevisual.cn/apps/openlist/openlist.yaml @@ -0,0 +1,71 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: openlist + labels: + app: openlist +spec: + replicas: 1 + selector: + matchLabels: + app: openlist + template: + metadata: + labels: + app: openlist + spec: + containers: + - name: openlist + image: docker.1ms.run/openlistteam/openlist:latest + securityContext: + runAsUser: 0 + ports: + - containerPort: 5244 + protocol: TCP + env: + - name: UMASK + value: "022" + volumeMounts: + - name: openlist-data + mountPath: /opt/openlist/data + volumes: + - name: openlist-data + hostPath: + path: /opt/docker/openlist/data + type: DirectoryOrCreate + nodeSelector: + machine: "kevisual" + +--- +apiVersion: v1 +kind: Service +metadata: + name: openlist + labels: + app: openlist +spec: + type: ClusterIP + ports: + - port: 5244 + targetPort: 5244 + protocol: TCP + name: http + selector: + app: openlist + +--- +apiVersion: traefik.io/v1alpha1 +kind: IngressRoute +metadata: + name: openlist-https +spec: + entryPoints: + - websecure + routes: + - match: Host(`openlist.kevisual.cn`) + kind: Rule + services: + - name: openlist + port: 5244 + tls: + certResolver: letsencrypt diff --git a/k8s/kevisual.cn/docs/02-查看启动.md b/k8s/kevisual.cn/docs/02-查看启动.md new file mode 100644 index 0000000..e45d8e6 --- /dev/null +++ b/k8s/kevisual.cn/docs/02-查看启动.md @@ -0,0 +1,6 @@ + +```sh + +kubectl logs openlist-869ffbc74f-kjmbs + +``` \ No newline at end of file