From 9c55c2742e87cfa7a1a462c21e35ce57f680c312 Mon Sep 17 00:00:00 2001 From: Janne Mareike Koschinski <janne@kuschku.de> Date: Wed, 15 Jun 2022 02:37:52 +0200 Subject: [PATCH] feat: Update readme --- README.md | 160 ++++++++++++++++++++++++++++++------------------------ 1 file changed, 89 insertions(+), 71 deletions(-) diff --git a/README.md b/README.md index a465d16..b127e71 100644 --- a/README.md +++ b/README.md @@ -18,24 +18,18 @@ Volume Mounts: Empty Directory -* /haiwen/logs -* /haiwen/pids +* /tmp Persistent Volume -* /haiwen/conf -* /haiwen/ccnet -* /haiwen/seafile-data -* /haiwen/seahub-data +* /conf +* /data Configuration Files -* /haiwen/ccnet/seafile.ini -* /haiwen/conf/ccnet.conf -* /haiwen/conf/seafdav.conf -* /haiwen/conf/seafile.conf -* /haiwen/conf/seahub_settings.py -* /haiwen/ccnet/mykey.peer +* /conf/ccnet.conf +* /conf/seafile.conf +* /conf/seahub_settings.py For kubernetes, the config would look like this: @@ -49,15 +43,45 @@ metadata: app: seafile data: ccnet.conf: |- - # Your data here - seafdav.conf: |- - # Your data here + [General] + SERVICE_URL = http://my.domain.tld + + [Database] + ENGINE = pgsql + HOST = database + PORT = 5432 + USER = seafile + PASSWD = seafile + DB = ccnet + CREATE_TABLES = true + + [Client] + PORT = 13419 + UNIX_SOCKET = /tmp/seafile.sock seafile.conf: |- - # Your data here + [fileserver] + port = 8082 + + [database] + type = pgsql + host = database + port = 5432 + user = seafile + password = seafile + db_name = seafile + create_tables = true seahub_settings.py: |- - # Your data here - seafile.ini: |- - # Your data here + FILE_SERVER_ROOT = 'http://my.domain.tld/seafhttp' + DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.postgresql', + 'NAME': 'seahub', + 'USER': 'seafile', + 'PASSWORD': 'seafile', + 'HOST': 'database', + 'PORT': '5432', + } + } ``` ```yaml @@ -70,7 +94,9 @@ metadata: app: seafile data: mykey.peer: |- + -----BEGIN RSA PRIVATE KEY----- # Your data here + -----END RSA PRIVATE KEY----- ``` ```yaml @@ -92,7 +118,7 @@ spec: ```yaml kind: Deployment -apiVersion: extensions/v1beta1 +apiVersion: apps/v1 metadata: name: seafile namespace: default @@ -119,55 +145,41 @@ spec: - name: key secret: secretName: seafile-key - - name: logs - emptyDir: {} - - name: pids + - name: tmp emptyDir: {} containers: - - name: seafile - image: k8r.eu/justjanne/seafile:latest + - name: server + image: k8r.eu/justjanne/seafile:server ports: - - name: seahub - containerPort: 8000 - protocol: TCP - name: seafhttp containerPort: 8082 protocol: TCP volumeMounts: - - name: logs - mountPath: /haiwen/logs - - name: pids - mountPath: /haiwen/pids - - name: data - mountPath: /haiwen/seafile-data - subPath: data - - name: data - mountPath: /haiwen/conf - subPath: config + - name: tmp + mountPath: /tmp - name: data - mountPath: /haiwen/ccnet - subPath: ccnet + mountPath: /data - name: config - mountPath: /haiwen/ccnet/seafile.ini - subPath: seafile.ini - - name: data - mountPath: /haiwen/seahub-data - subPath: seahub-data - - name: config - mountPath: /haiwen/conf/ccnet.conf - subPath: ccnet.conf - - name: config - mountPath: /haiwen/conf/seafdav.conf - subPath: seafdav.conf - - name: config - mountPath: /haiwen/conf/seafile.conf - subPath: seafile.conf - - name: config - mountPath: /haiwen/conf/seahub_settings.py - subPath: seahub_settings.py + mountPath: /conf - name: key - mountPath: /haiwen/ccnet/mykey.peer + mountPath: /conf/mykey.peer subPath: mykey.peer + - name: seahub + image: k8r.eu/justjanne/seafile:seahub + ports: + - name: seahub + containerPort: 8000 + protocol: TCP + volumeMounts: + - name: tmp + mountPath: /tmp + - name: data + mountPath: /data + - name: config + mountPath: /conf + - name: key + mountPath: /conf/mykey.peer + subPath: mykey.peer ``` ```yaml @@ -183,40 +195,46 @@ spec: - name: seahub protocol: TCP port: 8000 - targetPort: 8000 + targetPort: seahub - name: seafhttp protocol: TCP port: 8082 - targetPort: 8082 + targetPort: seafhttp selector: app: seafile type: ClusterIP ``` ```yaml -apiVersion: extensions/v1beta1 kind: Ingress +apiVersion: networking.k8s.io/v1 metadata: annotations: - kubernetes.io/ingress.class: nginx - kubernetes.io/tls-acme: "true" ingress.kubernetes.io/proxy-body-size: "0" name: seafile namespace: default spec: + ingressClassName: "nginx" rules: - host: cloud.example.com http: paths: - - backend: - serviceName: seafile - servicePort: 8000 - path: / - - backend: - serviceName: seafile - servicePort: 8082 - path: /seafhttp + - path: "/" + pathType: "Prefix" + backend: + service: + name: seafile + port: + name: seahub + - path: "/seafhttp" + pathType: "Prefix" + backend: + service: + name: seafile + port: + name: seafhttp tls: - hosts: - cloud.example.com secretName: seafile-tls +``` -- GitLab