添加 openlist 服务的 Docker Compose 配置和 Kubernetes 部署文件

This commit is contained in:
2026-01-08 01:38:48 +08:00
parent 8de1bff4f8
commit fd9695d170
3 changed files with 90 additions and 0 deletions

View File

@@ -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

View File

@@ -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