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