v2-s.jpg

二进制运行

下载

curl -OL "https://github.com/filebrowser/filebrowser/releases/download/v2.11.0/linux-amd64-filebrowser.tar.gz"

创建配置文件/root/filebrowser.json

{
 "address" : "0.0.0.0"
}

运行

/root/filebrowser -c /root/filebrowser.json

docker运行

docker run -d -v /root/filebrowser/sites/root:/srv -v /root/filebrowserconfig.json:/etc/config.json -v /root/filebrowser/database.db:/etc/database.db -p 8080:80 filebrowser/filebrowser

kubernetes运行

pvc

apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: filebrowser-data
  namespace: sre
spec:
  accessModes:
  - ReadWriteOnce
  resources:
    requests:
      storage: "1000Gi"
  volumeName: 
  storageClassName: nfs04


Deployment

apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    k8s.kuboard.cn/name: filebrowser
  name: filebrowser
  namespace: sre
spec:
  replicas: 1
  selector:
    matchLabels:
      k8s.kuboard.cn/name: filebrowser
  template:
    metadata:
      labels:
        k8s.kuboard.cn/name: filebrowser
    spec:
      containers:
        - image: filebrowser/filebrowser
          imagePullPolicy: IfNotPresent
          name: filebrowser
          ports:
            - containerPort: 80
              name: http
              protocol: TCP
          volumeMounts:
            - mountPath: /srv
              name: data
      volumes:
        - name: data
          persistentVolumeClaim:
            claimName: filebrowser-data



svc

apiVersion: v1
kind: Service
metadata:
  labels:
    k8s.kuboard.cn/name: filebrowser
  name: filebrowser
  namespace: sre
spec:
  ports:
    - name: http
      nodePort: 30036
      port: 80
      protocol: TCP
      targetPort: 80
  selector:
    k8s.kuboard.cn/name: filebrowser
  type: NodePort

visit

http://172.16.0.10:30036
默认账号密码:admin/admin

发表评论

您的电子邮箱地址不会被公开。 必填项已用*标注

Captcha Code