diff --git a/manual/404.md b/manual/404.md new file mode 100644 index 00000000..fb9298fb --- /dev/null +++ b/manual/404.md @@ -0,0 +1,3 @@ +# 404 - Page Not Found or Remove Permanently + +The requested file was not found. If you are still using **https://manual.seafile.com/xxx/**, please move to [https://manual.seafile.com/latest/xxx/](https://manual.seafile.com/latest/xxx/) as this path has been deprecated. We apologize for the inconvenience caused. \ No newline at end of file diff --git a/manual/config/seafile-conf.md b/manual/config/seafile-conf.md index e12ba1f8..b7752f64 100644 --- a/manual/config/seafile-conf.md +++ b/manual/config/seafile-conf.md @@ -226,6 +226,14 @@ Since Seafile 11.0.7 Pro, you can ask file server to check virus for every file check_virus_on_web_upload = true ``` +Since Seafile 12.0.4, after the upload is completed by the client, seafile server will check whether the uploaded blocks are complete. Ii's enabled by default. + +``` +[fileserver] +# default is true +verify_client_blocks_after_sync = true +``` + ## Database configuration The configurations of database are stored in the `[database]` section. diff --git a/manual/extension/setup_seadoc.md b/manual/extension/setup_seadoc.md index c9ef5a29..564da2ea 100644 --- a/manual/extension/setup_seadoc.md +++ b/manual/extension/setup_seadoc.md @@ -50,7 +50,6 @@ The easiest way to deployment SeaDoc is to deploy it with Seafile server on the COMPOSE_FILE='seafile-server.yml,caddy.yml,seadoc.yml' ENABLE_SEADOC=true - SEADOC_SERVER_URL=https://seafile.example.com/sdoc-server ``` 3. Start SeaDoc server server with the following command diff --git a/manual/repo/docker/seadoc.yml b/manual/repo/docker/seadoc.yml index 4e8dfa6a..85b4e705 100644 --- a/manual/repo/docker/seadoc.yml +++ b/manual/repo/docker/seadoc.yml @@ -16,7 +16,7 @@ services: - TIME_ZONE=${TIME_ZONE:-Etc/UTC} - JWT_PRIVATE_KEY=${JWT_PRIVATE_KEY:?Variable is not set or empty} - NON_ROOT=${NON_ROOT:-false} - - SEAHUB_SERVICE_URL=${SEAFILE_SERVER_PROTOCOL:-http}://${SEAFILE_SERVER_HOSTNAME:?Variable is not set or empty} + - SEAHUB_SERVICE_URL=${SEAFILE_SERVICE_URL:-http://seafile} labels: caddy: ${SEAFILE_SERVER_PROTOCOL:-http}://${SEAFILE_SERVER_HOSTNAME:?Variable is not set or empty} caddy.@ws.0_header: "Connection *Upgrade*" diff --git a/manual/repo/docker/seadoc/seadoc.yml b/manual/repo/docker/seadoc/seadoc.yml index e56a59db..aefa5f25 100644 --- a/manual/repo/docker/seadoc/seadoc.yml +++ b/manual/repo/docker/seadoc/seadoc.yml @@ -17,7 +17,7 @@ services: - TIME_ZONE=${TIME_ZONE:-Etc/UTC} - NON_ROOT=${NON_ROOT:-false} - JWT_PRIVATE_KEY=${JWT_PRIVATE_KEY:?Variable is not set or empty} - - SEAHUB_SERVICE_URL=${SEAFILE_SERVER_PROTOCOL:-http}://${SEAFILE_SERVER_HOSTNAME:?Variable is not set or empty} + - SEAHUB_SERVICE_URL=${SEAFILE_SERVICE_URL:-${SEAFILE_SERVER_PROTOCOL:-http}://${SEAFILE_SERVER_HOSTNAME:?Variable is not set or empty}} networks: - seafile-net diff --git a/manual/repo/k8s/ce/seafile-deployment.yaml b/manual/repo/k8s/ce/seafile-deployment.yaml index 45968553..640ab538 100644 --- a/manual/repo/k8s/ce/seafile-deployment.yaml +++ b/manual/repo/k8s/ce/seafile-deployment.yaml @@ -2,6 +2,7 @@ apiVersion: apps/v1 kind: Deployment metadata: name: seafile + namespace: seafile spec: replicas: 1 selector: @@ -14,163 +15,12 @@ spec: spec: containers: - name: seafile - image: seafileltd/seafile-pro-mc:13.0-latest - env: - - name: SEAFILE_SERVER_HOSTNAME - valueFrom: - configMapKeyRef: - name: seafile-env - key: SEAFILE_SERVER_HOSTNAME - - name: SEAFILE_SERVER_PROTOCOL - valueFrom: - configMapKeyRef: - name: seafile-env - key: SEAFILE_SERVER_PROTOCOL - - name: TIME_ZONE - valueFrom: - configMapKeyRef: - name: seafile-env - key: TIME_ZONE - - name: SEAFILE_LOG_TO_STDOUT - valueFrom: - configMapKeyRef: - name: seafile-env - key: SEAFILE_LOG_TO_STDOUT - - name: SITE_ROOT - valueFrom: - configMapKeyRef: - name: seafile-env - key: SITE_ROOT - - name: ENABLE_SEADOC - valueFrom: - configMapKeyRef: - name: seafile-env - key: ENABLE_SEADOC - - name: SEADOC_SERVER_URL - valueFrom: - configMapKeyRef: - name: seafile-env - key: SEADOC_SERVER_URL - - name: SEAFILE_MYSQL_DB_HOST - valueFrom: - configMapKeyRef: - name: seafile-env - key: SEAFILE_MYSQL_DB_HOST - - name: SEAFILE_MYSQL_DB_PORT - valueFrom: - configMapKeyRef: - name: seafile-env - key: SEAFILE_MYSQL_DB_PORT - - name: SEAFILE_MYSQL_DB_USER - valueFrom: - configMapKeyRef: - name: seafile-env - key: SEAFILE_MYSQL_DB_USER - - name: SEAFILE_MYSQL_DB_CCNET_DB_NAME - valueFrom: - configMapKeyRef: - name: seafile-env - key: SEAFILE_MYSQL_DB_CCNET_DB_NAME - - name: SEAFILE_MYSQL_DB_SEAFILE_DB_NAME - valueFrom: - configMapKeyRef: - name: seafile-env - key: SEAFILE_MYSQL_DB_SEAFILE_DB_NAME - - name: SEAFILE_MYSQL_DB_SEAHUB_DB_NAME - valueFrom: - configMapKeyRef: - name: seafile-env - key: SEAFILE_MYSQL_DB_SEAHUB_DB_NAME - - name: INIT_SEAFILE_ADMIN_EMAIL - valueFrom: - configMapKeyRef: - name: seafile-env - key: INIT_SEAFILE_ADMIN_EMAIL - - name: CACHE_PROVIDER - valueFrom: - configMapKeyRef: - name: seafile-env - key: CACHE_PROVIDER - - name: REDIS_HOST - valueFrom: - configMapKeyRef: - name: seafile-env - key: REDIS_HOST - - name: REDIS_PORT - valueFrom: - configMapKeyRef: - name: seafile-env - key: REDIS_PORT - - name: MEMCACHED_HOST - valueFrom: - configMapKeyRef: - name: seafile-env - key: MEMCACHED_HOST - - name: MEMCACHED_PORT - valueFrom: - configMapKeyRef: - name: seafile-env - key: MEMCACHED_PORT - - name: ENABLE_NOTIFICATION_SERVER - valueFrom: - configMapKeyRef: - name: seafile-env - key: ENABLE_NOTIFICATION_SERVER - - name: INNER_NOTIFICATION_SERVER_URL - valueFrom: - configMapKeyRef: - name: seafile-env - key: NOTIFICATION_SERVER_URL - - name: NOTIFICATION_SERVER_URL - valueFrom: - configMapKeyRef: - name: seafile-env - key: NOTIFICATION_SERVER_URL - - name: ENABLE_SEAFILE_AI - valueFrom: - configMapKeyRef: - name: seafile-env - key: ENABLE_SEAFILE_AI - - name: SEAFILE_AI_SERVER_URL - valueFrom: - configMapKeyRef: - name: seafile-env - key: SEAFILE_AI_SERVER_URL - - name: MD_FILE_COUNT_LIMIT - valueFrom: - configMapKeyRef: - name: seafile-env - key: MD_FILE_COUNT_LIMIT - - name: JWT_PRIVATE_KEY - valueFrom: - secretKeyRef: - name: seafile-secret - key: JWT_PRIVATE_KEY - - name: SEAFILE_MYSQL_DB_PASSWORD - valueFrom: - secretKeyRef: - name: seafile-secret - key: SEAFILE_MYSQL_DB_PASSWORD - - name: INIT_SEAFILE_MYSQL_ROOT_PASSWORD - valueFrom: - secretKeyRef: - name: seafile-secret - key: INIT_SEAFILE_MYSQL_ROOT_PASSWORD - - name: INIT_SEAFILE_ADMIN_PASSWORD - valueFrom: - secretKeyRef: - name: seafile-secret - key: INIT_SEAFILE_ADMIN_PASSWORD - - name: REDIS_PASSWORD - valueFrom: - secretKeyRef: - name: seafile-secret - key: REDIS_PASSWORD - - name: SEAFILE_AI_SECRET_KEY - valueFrom: - secretKeyRef: - name: seafile-secret - key: JWT_PRIVATE_KEY + image: seafileltd/seafile-mc:13.0-latest + envFrom: + - configMapRef: + name: seafile-env + - secretRef: + name: seafile-secret volumeMounts: - name: seafile-data mountPath: /shared diff --git a/manual/repo/k8s/ce/seafile-env.yaml b/manual/repo/k8s/ce/seafile-env.yaml index b8cfb428..48e485ce 100644 --- a/manual/repo/k8s/ce/seafile-env.yaml +++ b/manual/repo/k8s/ce/seafile-env.yaml @@ -2,10 +2,11 @@ apiVersion: v1 kind: ConfigMap metadata: name: seafile-env + namespace: seafile data: # for Seafile server TIME_ZONE: "UTC" - SEAFILE_LOG_TO_STDOUT: "false" + SEAFILE_LOG_TO_STDOUT: "true" SITE_ROOT: "/" SEAFILE_SERVER_HOSTNAME: "seafile.example.com" SEAFILE_SERVER_PROTOCOL: "http" diff --git a/manual/repo/k8s/ce/seafile-persistentvolumeclaim.yaml b/manual/repo/k8s/ce/seafile-persistentvolumeclaim.yaml index 28d26c02..06289246 100644 --- a/manual/repo/k8s/ce/seafile-persistentvolumeclaim.yaml +++ b/manual/repo/k8s/ce/seafile-persistentvolumeclaim.yaml @@ -2,9 +2,12 @@ apiVersion: v1 kind: PersistentVolumeClaim metadata: name: seafile-data + namespace: seafile spec: accessModes: - ReadWriteOnce resources: requests: - storage: 10Gi \ No newline at end of file + storage: 10Gi + # if you would like to use PV bound from a storage class, please uncomment the following line + # storageClassName: \ No newline at end of file diff --git a/manual/repo/k8s/ce/seafile-secret.yaml b/manual/repo/k8s/ce/seafile-secret.yaml deleted file mode 100644 index 8ecdc537..00000000 --- a/manual/repo/k8s/ce/seafile-secret.yaml +++ /dev/null @@ -1,21 +0,0 @@ -apiVersion: v1 -kind: Secret -metadata: - name: seafile-secret -type: Opaque -data: - # for Seafile server - JWT_PRIVATE_KEY: "" - - # for database - SEAFILE_MYSQL_DB_PASSWORD: "" - - # Initialization - ## for seafile - INIT_SEAFILE_ADMIN_PASSWORD: "" - - ## for db - INIT_SEAFILE_MYSQL_ROOT_PASSWORD: "" - - # for redis - REDIS_PASSWORD: "" \ No newline at end of file diff --git a/manual/repo/k8s/ce/seafile-service.yaml b/manual/repo/k8s/ce/seafile-service.yaml index 9c5997ba..1e0695c6 100644 --- a/manual/repo/k8s/ce/seafile-service.yaml +++ b/manual/repo/k8s/ce/seafile-service.yaml @@ -2,12 +2,12 @@ apiVersion: v1 kind: Service metadata: name: seafile + namespace: seafile spec: selector: app: seafile - type: LoadBalancer + type: ClusterIP ports: - protocol: TCP port: 80 - targetPort: 80 - nodePort: 30000 \ No newline at end of file + targetPort: 80 \ No newline at end of file diff --git a/manual/repo/k8s/cluster/seafile-backend-deployment.yaml b/manual/repo/k8s/cluster/seafile-backend-deployment.yaml index f327a33f..e2df9ba0 100644 --- a/manual/repo/k8s/cluster/seafile-backend-deployment.yaml +++ b/manual/repo/k8s/cluster/seafile-backend-deployment.yaml @@ -2,6 +2,7 @@ apiVersion: apps/v1 kind: Deployment metadata: name: seafile-backend + namespace: seafile spec: replicas: 1 selector: @@ -27,206 +28,11 @@ spec: value: "true" - name: CLUSTER_MODE value: "backend" - - name: SEAFILE_SERVER_HOSTNAME - valueFrom: - configMapKeyRef: - name: seafile-env - key: SEAFILE_SERVER_HOSTNAME - - name: SEAFILE_SERVER_PROTOCOL - valueFrom: - configMapKeyRef: - name: seafile-env - key: SEAFILE_SERVER_PROTOCOL - - name: TIME_ZONE - valueFrom: - configMapKeyRef: - name: seafile-env - key: TIME_ZONE - - name: SEAFILE_LOG_TO_STDOUT - valueFrom: - configMapKeyRef: - name: seafile-env - key: SEAFILE_LOG_TO_STDOUT - - name: SITE_ROOT - valueFrom: - configMapKeyRef: - name: seafile-env - key: SITE_ROOT - - name: SEAFILE_MYSQL_DB_HOST - valueFrom: - configMapKeyRef: - name: seafile-env - key: SEAFILE_MYSQL_DB_HOST - - name: SEAFILE_MYSQL_DB_PORT - valueFrom: - configMapKeyRef: - name: seafile-env - key: SEAFILE_MYSQL_DB_PORT - - name: SEAFILE_MYSQL_DB_USER - valueFrom: - configMapKeyRef: - name: seafile-env - key: SEAFILE_MYSQL_DB_USER - - name: SEAFILE_MYSQL_DB_CCNET_DB_NAME - valueFrom: - configMapKeyRef: - name: seafile-env - key: SEAFILE_MYSQL_DB_CCNET_DB_NAME - - name: SEAFILE_MYSQL_DB_SEAFILE_DB_NAME - valueFrom: - configMapKeyRef: - name: seafile-env - key: SEAFILE_MYSQL_DB_SEAFILE_DB_NAME - - name: SEAFILE_MYSQL_DB_SEAHUB_DB_NAME - valueFrom: - configMapKeyRef: - name: seafile-env - key: SEAFILE_MYSQL_DB_SEAHUB_DB_NAME - - name: CACHE_PROVIDER - valueFrom: - configMapKeyRef: - name: seafile-env - key: CACHE_PROVIDER - - name: REDIS_HOST - valueFrom: - configMapKeyRef: - name: seafile-env - key: REDIS_HOST - - name: REDIS_PORT - valueFrom: - configMapKeyRef: - name: seafile-env - key: REDIS_PORT - - name: MEMCACHED_HOST - valueFrom: - configMapKeyRef: - name: seafile-env - key: MEMCACHED_HOST - - name: MEMCACHED_PORT - valueFrom: - configMapKeyRef: - name: seafile-env - key: MEMCACHED_PORT - - name: CLUSTER_INIT_MODE - valueFrom: - configMapKeyRef: - name: seafile-env - key: CLUSTER_INIT_MODE - - name: CLUSTER_INIT_ES_HOST - valueFrom: - configMapKeyRef: - name: seafile-env - key: CLUSTER_INIT_ES_HOST - - name: CLUSTER_INIT_ES_PORT - valueFrom: - configMapKeyRef: - name: seafile-env - key: CLUSTER_INIT_ES_PORT - - name: SEAF_SERVER_STORAGE_TYPE - valueFrom: - configMapKeyRef: - name: seafile-env - key: SEAF_SERVER_STORAGE_TYPE - - name: S3_COMMIT_BUCKET - valueFrom: - configMapKeyRef: - name: seafile-env - key: S3_COMMIT_BUCKET - - name: S3_FS_BUCKET - valueFrom: - configMapKeyRef: - name: seafile-env - key: S3_FS_BUCKET - - name: S3_BLOCK_BUCKET - valueFrom: - configMapKeyRef: - name: seafile-env - key: S3_BLOCK_BUCKET - - name: S3_KEY_ID - valueFrom: - configMapKeyRef: - name: seafile-env - key: S3_KEY_ID - - name: S3_USE_V4_SIGNATURE - valueFrom: - configMapKeyRef: - name: seafile-env - key: S3_USE_V4_SIGNATURE - - name: S3_AWS_REGION - valueFrom: - configMapKeyRef: - name: seafile-env - key: S3_AWS_REGION - - name: S3_HOST - valueFrom: - configMapKeyRef: - name: seafile-env - key: S3_HOST - - name: S3_USE_HTTPS - valueFrom: - configMapKeyRef: - name: seafile-env - key: S3_USE_HTTPS - - name: S3_PATH_STYLE_REQUEST - valueFrom: - configMapKeyRef: - name: seafile-env - key: S3_PATH_STYLE_REQUEST - - name: ENABLE_SEAFILE_AI - valueFrom: - configMapKeyRef: - name: seafile-env - key: ENABLE_SEAFILE_AI - - name: SEAFILE_AI_SERVER_URL - valueFrom: - configMapKeyRef: - name: seafile-env - key: SEAFILE_AI_SERVER_URL - - name: INIT_SEAFILE_ADMIN_EMAIL - valueFrom: - configMapKeyRef: - name: seafile-env - key: INIT_SEAFILE_ADMIN_EMAIL - - name: JWT_PRIVATE_KEY - valueFrom: - secretKeyRef: - name: seafile-secret - key: JWT_PRIVATE_KEY - - name: SEAFILE_MYSQL_DB_PASSWORD - valueFrom: - secretKeyRef: - name: seafile-secret - key: SEAFILE_MYSQL_DB_PASSWORD - - name: INIT_SEAFILE_MYSQL_ROOT_PASSWORD - valueFrom: - secretKeyRef: - name: seafile-secret - key: INIT_SEAFILE_MYSQL_ROOT_PASSWORD - - name: INIT_SEAFILE_ADMIN_PASSWORD - valueFrom: - secretKeyRef: - name: seafile-secret - key: INIT_SEAFILE_ADMIN_PASSWORD - - name: S3_SECRET_KEY - valueFrom: - secretKeyRef: - name: seafile-secret - key: S3_SECRET_KEY - - name: S3_SSE_C_KEY - valueFrom: - secretKeyRef: - name: seafile-secret - key: S3_SSE_C_KEY - - name: REDIS_PASSWORD - valueFrom: - secretKeyRef: - name: seafile-secret - key: REDIS_PASSWORD - - name: SEAFILE_AI_SECRET_KEY - valueFrom: - secretKeyRef: - name: seafile-secret - key: JWT_PRIVATE_KEY + envFrom: + - configMapRef: + name: seafile-env + - secretRef: + name: seafile-secret volumeMounts: - name: seafile-data mountPath: /shared diff --git a/manual/repo/k8s/cluster/seafile-env.yaml b/manual/repo/k8s/cluster/seafile-env.yaml index 237d1631..a2c17293 100644 --- a/manual/repo/k8s/cluster/seafile-env.yaml +++ b/manual/repo/k8s/cluster/seafile-env.yaml @@ -2,6 +2,7 @@ apiVersion: v1 kind: ConfigMap metadata: name: seafile-env + namespace: seafile data: # for Seafile server TIME_ZONE: "UTC" diff --git a/manual/repo/k8s/cluster/seafile-frontend-deployment.yaml b/manual/repo/k8s/cluster/seafile-frontend-deployment.yaml index 33bf6e03..2f38ff94 100644 --- a/manual/repo/k8s/cluster/seafile-frontend-deployment.yaml +++ b/manual/repo/k8s/cluster/seafile-frontend-deployment.yaml @@ -2,6 +2,7 @@ apiVersion: apps/v1 kind: Deployment metadata: name: seafile-frontend + namespace: seafile spec: replicas: 2 # change to your frontend service number, i.e., N_f selector: @@ -27,206 +28,11 @@ spec: value: "true" - name: CLUSTER_MODE value: "frontend" - - name: SEAFILE_SERVER_HOSTNAME - valueFrom: - configMapKeyRef: - name: seafile-env - key: SEAFILE_SERVER_HOSTNAME - - name: SEAFILE_SERVER_PROTOCOL - valueFrom: - configMapKeyRef: - name: seafile-env - key: SEAFILE_SERVER_PROTOCOL - - name: TIME_ZONE - valueFrom: - configMapKeyRef: - name: seafile-env - key: TIME_ZONE - - name: SEAFILE_LOG_TO_STDOUT - valueFrom: - configMapKeyRef: - name: seafile-env - key: SEAFILE_LOG_TO_STDOUT - - name: SITE_ROOT - valueFrom: - configMapKeyRef: - name: seafile-env - key: SITE_ROOT - - name: ENABLE_SEADOC - valueFrom: - configMapKeyRef: - name: seafile-env - key: ENABLE_SEADOC - - name: SEADOC_SERVER_URL - valueFrom: - configMapKeyRef: - name: seafile-env - key: SEADOC_SERVER_URL - - name: SEAFILE_MYSQL_DB_HOST - valueFrom: - configMapKeyRef: - name: seafile-env - key: SEAFILE_MYSQL_DB_HOST - - name: SEAFILE_MYSQL_DB_PORT - valueFrom: - configMapKeyRef: - name: seafile-env - key: SEAFILE_MYSQL_DB_PORT - - name: SEAFILE_MYSQL_DB_USER - valueFrom: - configMapKeyRef: - name: seafile-env - key: SEAFILE_MYSQL_DB_USER - - name: SEAFILE_MYSQL_DB_CCNET_DB_NAME - valueFrom: - configMapKeyRef: - name: seafile-env - key: SEAFILE_MYSQL_DB_CCNET_DB_NAME - - name: SEAFILE_MYSQL_DB_SEAFILE_DB_NAME - valueFrom: - configMapKeyRef: - name: seafile-env - key: SEAFILE_MYSQL_DB_SEAFILE_DB_NAME - - name: SEAFILE_MYSQL_DB_SEAHUB_DB_NAME - valueFrom: - configMapKeyRef: - name: seafile-env - key: SEAFILE_MYSQL_DB_SEAHUB_DB_NAME - - name: CACHE_PROVIDER - valueFrom: - configMapKeyRef: - name: seafile-env - key: CACHE_PROVIDER - - name: REDIS_HOST - valueFrom: - configMapKeyRef: - name: seafile-env - key: REDIS_HOST - - name: REDIS_PORT - valueFrom: - configMapKeyRef: - name: seafile-env - key: REDIS_PORT - - name: MEMCACHED_HOST - valueFrom: - configMapKeyRef: - name: seafile-env - key: MEMCACHED_HOST - - name: MEMCACHED_PORT - valueFrom: - configMapKeyRef: - name: seafile-env - key: MEMCACHED_PORT - - name: SEAF_SERVER_STORAGE_TYPE - valueFrom: - configMapKeyRef: - name: seafile-env - key: SEAF_SERVER_STORAGE_TYPE - - name: S3_COMMIT_BUCKET - valueFrom: - configMapKeyRef: - name: seafile-env - key: S3_COMMIT_BUCKET - - name: S3_FS_BUCKET - valueFrom: - configMapKeyRef: - name: seafile-env - key: S3_FS_BUCKET - - name: S3_BLOCK_BUCKET - valueFrom: - configMapKeyRef: - name: seafile-env - key: S3_BLOCK_BUCKET - - name: S3_KEY_ID - valueFrom: - configMapKeyRef: - name: seafile-env - key: S3_KEY_ID - - name: S3_USE_V4_SIGNATURE - valueFrom: - configMapKeyRef: - name: seafile-env - key: S3_USE_V4_SIGNATURE - - name: S3_AWS_REGION - valueFrom: - configMapKeyRef: - name: seafile-env - key: S3_AWS_REGION - - name: S3_HOST - valueFrom: - configMapKeyRef: - name: seafile-env - key: S3_HOST - - name: S3_USE_HTTPS - valueFrom: - configMapKeyRef: - name: seafile-env - key: S3_USE_HTTPS - - name: S3_PATH_STYLE_REQUEST - valueFrom: - configMapKeyRef: - name: seafile-env - key: S3_PATH_STYLE_REQUEST - - name: ENABLE_NOTIFICATION_SERVER - valueFrom: - configMapKeyRef: - name: seafile-env - key: ENABLE_NOTIFICATION_SERVER - - name: INNER_NOTIFICATION_SERVER_URL - valueFrom: - configMapKeyRef: - name: seafile-env - key: NOTIFICATION_SERVER_URL - - name: NOTIFICATION_SERVER_URL - valueFrom: - configMapKeyRef: - name: seafile-env - key: NOTIFICATION_SERVER_URL - - name: ENABLE_SEAFILE_AI - valueFrom: - configMapKeyRef: - name: seafile-env - key: ENABLE_SEAFILE_AI - - name: SEAFILE_AI_SERVER_URL - valueFrom: - configMapKeyRef: - name: seafile-env - key: SEAFILE_AI_SERVER_URL - - name: MD_FILE_COUNT_LIMIT - valueFrom: - configMapKeyRef: - name: seafile-env - key: MD_FILE_COUNT_LIMIT - - name: JWT_PRIVATE_KEY - valueFrom: - secretKeyRef: - name: seafile-secret - key: JWT_PRIVATE_KEY - - name: SEAFILE_MYSQL_DB_PASSWORD - valueFrom: - secretKeyRef: - name: seafile-secret - key: SEAFILE_MYSQL_DB_PASSWORD - - name: S3_SECRET_KEY - valueFrom: - secretKeyRef: - name: seafile-secret - key: S3_SECRET_KEY - - name: S3_SSE_C_KEY - valueFrom: - secretKeyRef: - name: seafile-secret - key: S3_SSE_C_KEY - - name: REDIS_PASSWORD - valueFrom: - secretKeyRef: - name: seafile-secret - key: REDIS_PASSWORD - - name: SEAFILE_AI_SECRET_KEY - valueFrom: - secretKeyRef: - name: seafile-secret - key: JWT_PRIVATE_KEY + envFrom: + - configMapRef: + name: seafile-env + - secretRef: + name: seafile-secret ports: - containerPort: 80 volumeMounts: diff --git a/manual/repo/k8s/cluster/seafile-persistentvolumeclaim.yaml b/manual/repo/k8s/cluster/seafile-persistentvolumeclaim.yaml index 28d26c02..06289246 100644 --- a/manual/repo/k8s/cluster/seafile-persistentvolumeclaim.yaml +++ b/manual/repo/k8s/cluster/seafile-persistentvolumeclaim.yaml @@ -2,9 +2,12 @@ apiVersion: v1 kind: PersistentVolumeClaim metadata: name: seafile-data + namespace: seafile spec: accessModes: - ReadWriteOnce resources: requests: - storage: 10Gi \ No newline at end of file + storage: 10Gi + # if you would like to use PV bound from a storage class, please uncomment the following line + # storageClassName: \ No newline at end of file diff --git a/manual/repo/k8s/cluster/seafile-secret.yaml b/manual/repo/k8s/cluster/seafile-secret.yaml deleted file mode 100644 index 56e8fb2d..00000000 --- a/manual/repo/k8s/cluster/seafile-secret.yaml +++ /dev/null @@ -1,25 +0,0 @@ -apiVersion: v1 -kind: Secret -metadata: - name: seafile-secret -type: Opaque -data: - # for Seafile server - JWT_PRIVATE_KEY: "" - - # for database - SEAFILE_MYSQL_DB_PASSWORD: "" - - # Initialization - ## for Seafile admin - INIT_SEAFILE_ADMIN_PASSWORD: "" - - ## for db - INIT_SEAFILE_MYSQL_ROOT_PASSWORD: "" - - # For S3 storage backend (only valid in USE_S3_STORAGE = true) - S3_SECRET_KEY: "" - S3_SSE_C_KEY: "" - - # for redis - REDIS_PASSWORD: "" diff --git a/manual/repo/k8s/cluster/seafile-service.yaml b/manual/repo/k8s/cluster/seafile-service.yaml index f2accd22..4f48cc8e 100644 --- a/manual/repo/k8s/cluster/seafile-service.yaml +++ b/manual/repo/k8s/cluster/seafile-service.yaml @@ -2,12 +2,12 @@ apiVersion: v1 kind: Service metadata: name: seafile + namespace: seafile spec: selector: app: seafile-frontend - type: LoadBalancer + type: ClusterIP ports: - protocol: TCP port: 80 - targetPort: 80 - nodePort: 30000 \ No newline at end of file + targetPort: 80 \ No newline at end of file diff --git a/manual/repo/k8s/pro/seafile-deployment.yaml b/manual/repo/k8s/pro/seafile-deployment.yaml index 41df6e06..11d2ea21 100644 --- a/manual/repo/k8s/pro/seafile-deployment.yaml +++ b/manual/repo/k8s/pro/seafile-deployment.yaml @@ -2,6 +2,7 @@ apiVersion: apps/v1 kind: Deployment metadata: name: seafile + namespace: seafile spec: replicas: 1 selector: @@ -14,223 +15,12 @@ spec: spec: containers: - name: seafile - image: seafileltd/seafile-pro-mc:12.0-latest - env: - - name: SEAFILE_SERVER_HOSTNAME - valueFrom: - configMapKeyRef: - name: seafile-env - key: SEAFILE_SERVER_HOSTNAME - - name: SEAFILE_SERVER_PROTOCOL - valueFrom: - configMapKeyRef: - name: seafile-env - key: SEAFILE_SERVER_PROTOCOL - - name: TIME_ZONE - valueFrom: - configMapKeyRef: - name: seafile-env - key: TIME_ZONE - - name: SEAFILE_LOG_TO_STDOUT - valueFrom: - configMapKeyRef: - name: seafile-env - key: SEAFILE_LOG_TO_STDOUT - - name: SITE_ROOT - valueFrom: - configMapKeyRef: - name: seafile-env - key: SITE_ROOT - - name: ENABLE_SEADOC - valueFrom: - configMapKeyRef: - name: seafile-env - key: ENABLE_SEADOC - - name: SEADOC_SERVER_URL - valueFrom: - configMapKeyRef: - name: seafile-env - key: SEADOC_SERVER_URL - - name: SEAFILE_MYSQL_DB_HOST - valueFrom: - configMapKeyRef: - name: seafile-env - key: SEAFILE_MYSQL_DB_HOST - - name: SEAFILE_MYSQL_DB_PORT - valueFrom: - configMapKeyRef: - name: seafile-env - key: SEAFILE_MYSQL_DB_PORT - - name: SEAFILE_MYSQL_DB_USER - valueFrom: - configMapKeyRef: - name: seafile-env - key: SEAFILE_MYSQL_DB_USER - - name: SEAFILE_MYSQL_DB_CCNET_DB_NAME - valueFrom: - configMapKeyRef: - name: seafile-env - key: SEAFILE_MYSQL_DB_CCNET_DB_NAME - - name: SEAFILE_MYSQL_DB_SEAFILE_DB_NAME - valueFrom: - configMapKeyRef: - name: seafile-env - key: SEAFILE_MYSQL_DB_SEAFILE_DB_NAME - - name: SEAFILE_MYSQL_DB_SEAHUB_DB_NAME - valueFrom: - configMapKeyRef: - name: seafile-env - key: SEAFILE_MYSQL_DB_SEAHUB_DB_NAME - - name: SEAF_SERVER_STORAGE_TYPE - valueFrom: - configMapKeyRef: - name: seafile-env - key: SEAF_SERVER_STORAGE_TYPE - - name: S3_COMMIT_BUCKET - valueFrom: - configMapKeyRef: - name: seafile-env - key: S3_COMMIT_BUCKET - - name: S3_FS_BUCKET - valueFrom: - configMapKeyRef: - name: seafile-env - key: S3_FS_BUCKET - - name: S3_BLOCK_BUCKET - valueFrom: - configMapKeyRef: - name: seafile-env - key: S3_BLOCK_BUCKET - - name: S3_KEY_ID - valueFrom: - configMapKeyRef: - name: seafile-env - key: S3_KEY_ID - - name: S3_USE_V4_SIGNATURE - valueFrom: - configMapKeyRef: - name: seafile-env - key: S3_USE_V4_SIGNATURE - - name: S3_AWS_REGION - valueFrom: - configMapKeyRef: - name: seafile-env - key: S3_AWS_REGION - - name: S3_HOST - valueFrom: - configMapKeyRef: - name: seafile-env - key: S3_HOST - - name: S3_USE_HTTPS - valueFrom: - configMapKeyRef: - name: seafile-env - key: S3_USE_HTTPS - - name: S3_PATH_STYLE_REQUEST - valueFrom: - configMapKeyRef: - name: seafile-env - key: S3_PATH_STYLE_REQUEST - - name: INIT_SEAFILE_ADMIN_EMAIL - valueFrom: - configMapKeyRef: - name: seafile-env - key: INIT_SEAFILE_ADMIN_EMAIL - - name: CACHE_PROVIDER - valueFrom: - configMapKeyRef: - name: seafile-env - key: CACHE_PROVIDER - - name: REDIS_HOST - valueFrom: - configMapKeyRef: - name: seafile-env - key: REDIS_HOST - - name: REDIS_PORT - valueFrom: - configMapKeyRef: - name: seafile-env - key: REDIS_PORT - - name: MEMCACHED_HOST - valueFrom: - configMapKeyRef: - name: seafile-env - key: MEMCACHED_HOST - - name: MEMCACHED_PORT - valueFrom: - configMapKeyRef: - name: seafile-env - key: MEMCACHED_PORT - - name: ENABLE_NOTIFICATION_SERVER - valueFrom: - configMapKeyRef: - name: seafile-env - key: ENABLE_NOTIFICATION_SERVER - - name: INNER_NOTIFICATION_SERVER_URL - valueFrom: - configMapKeyRef: - name: seafile-env - key: NOTIFICATION_SERVER_URL - - name: NOTIFICATION_SERVER_URL - valueFrom: - configMapKeyRef: - name: seafile-env - key: NOTIFICATION_SERVER_URL - - name: ENABLE_SEAFILE_AI - valueFrom: - configMapKeyRef: - name: seafile-env - key: ENABLE_SEAFILE_AI - - name: SEAFILE_AI_SERVER_URL - valueFrom: - configMapKeyRef: - name: seafile-env - key: SEAFILE_AI_SERVER_URL - - name: MD_FILE_COUNT_LIMIT - valueFrom: - configMapKeyRef: - name: seafile-env - key: MD_FILE_COUNT_LIMIT - - name: JWT_PRIVATE_KEY - valueFrom: - secretKeyRef: - name: seafile-secret - key: JWT_PRIVATE_KEY - - name: DB_PASSWORD - valueFrom: - secretKeyRef: - name: seafile-secret - key: SEAFILE_MYSQL_DB_PASSWORD - - name: DB_ROOT_PASSWD - valueFrom: - secretKeyRef: - name: seafile-secret - key: INIT_SEAFILE_MYSQL_ROOT_PASSWORD - - name: INIT_SEAFILE_ADMIN_PASSWORD - valueFrom: - secretKeyRef: - name: seafile-secret - key: INIT_SEAFILE_ADMIN_PASSWORD - - name: REDIS_PASSWORD - valueFrom: - secretKeyRef: - name: seafile-secret - key: REDIS_PASSWORD - - name: S3_SECRET_KEY - valueFrom: - secretKeyRef: - name: seafile-secret - key: S3_SECRET_KEY - - name: S3_SSE_C_KEY - valueFrom: - secretKeyRef: - name: seafile-secret - key: S3_SSE_C_KEY - - name: SEAFILE_AI_SECRET_KEY - valueFrom: - secretKeyRef: - name: seafile-secret - key: JWT_PRIVATE_KEY + image: seafileltd/seafile-pro-mc:13.0-latest + envFrom: + - configMapRef: + name: seafile-env + - secretRef: + name: seafile-secret volumeMounts: - name: seafile-data mountPath: /shared diff --git a/manual/repo/k8s/pro/seafile-env.yaml b/manual/repo/k8s/pro/seafile-env.yaml index a5dbee14..3b16dd49 100644 --- a/manual/repo/k8s/pro/seafile-env.yaml +++ b/manual/repo/k8s/pro/seafile-env.yaml @@ -2,10 +2,11 @@ apiVersion: v1 kind: ConfigMap metadata: name: seafile-env + namespace: seafile data: # for Seafile server TIME_ZONE: "UTC" - SEAFILE_LOG_TO_STDOUT: "false" + SEAFILE_LOG_TO_STDOUT: "true" SITE_ROOT: "/" SEAFILE_SERVER_HOSTNAME: "seafile.example.com" SEAFILE_SERVER_PROTOCOL: "http" diff --git a/manual/repo/k8s/pro/seafile-persistentvolumeclaim.yaml b/manual/repo/k8s/pro/seafile-persistentvolumeclaim.yaml index 28d26c02..06289246 100644 --- a/manual/repo/k8s/pro/seafile-persistentvolumeclaim.yaml +++ b/manual/repo/k8s/pro/seafile-persistentvolumeclaim.yaml @@ -2,9 +2,12 @@ apiVersion: v1 kind: PersistentVolumeClaim metadata: name: seafile-data + namespace: seafile spec: accessModes: - ReadWriteOnce resources: requests: - storage: 10Gi \ No newline at end of file + storage: 10Gi + # if you would like to use PV bound from a storage class, please uncomment the following line + # storageClassName: \ No newline at end of file diff --git a/manual/repo/k8s/pro/seafile-secret.yaml b/manual/repo/k8s/pro/seafile-secret.yaml deleted file mode 100644 index db0f2941..00000000 --- a/manual/repo/k8s/pro/seafile-secret.yaml +++ /dev/null @@ -1,25 +0,0 @@ -apiVersion: v1 -kind: Secret -metadata: - name: seafile-secret -type: Opaque -data: - # for Seafile server - JWT_PRIVATE_KEY: "" - - # for database - SEAFILE_MYSQL_DB_PASSWORD: "" - - # Initialization - ## for seafile - INIT_SEAFILE_ADMIN_PASSWORD: "" - - ## for db - INIT_SEAFILE_MYSQL_ROOT_PASSWORD: "" - - # For S3 storage backend (only valid in USE_S3_STORAGE = true) - S3_SECRET_KEY: "" - S3_SSE_C_KEY: "" - - # for redis - REDIS_PASSWORD: "" \ No newline at end of file diff --git a/manual/repo/k8s/pro/seafile-service.yaml b/manual/repo/k8s/pro/seafile-service.yaml index 9c5997ba..1e0695c6 100644 --- a/manual/repo/k8s/pro/seafile-service.yaml +++ b/manual/repo/k8s/pro/seafile-service.yaml @@ -2,12 +2,12 @@ apiVersion: v1 kind: Service metadata: name: seafile + namespace: seafile spec: selector: app: seafile - type: LoadBalancer + type: ClusterIP ports: - protocol: TCP port: 80 - targetPort: 80 - nodePort: 30000 \ No newline at end of file + targetPort: 80 \ No newline at end of file diff --git a/manual/setup/cluster_deploy_with_k8s.md b/manual/setup/cluster_deploy_with_k8s.md index 0407a8fa..53b60348 100644 --- a/manual/setup/cluster_deploy_with_k8s.md +++ b/manual/setup/cluster_deploy_with_k8s.md @@ -20,6 +20,21 @@ After installation, you need to start the k8s control plane service on each node !!! tip Although we recommend installing the *k8s control plane tool* on each node, it does not mean that we will use each node as a control plane node, but it is a necessary tool to create or join a K8S cluster. For details, please refer to the above [link](https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/create-cluster-kubeadm/) about **creating or joining into a cluster**. +## Create namespace and secretMap + +```sh +kubectl create ns seafile + +kubectl create secret generic seafile-secret --namespace seafile \ +--from-literal=JWT_PRIVATE_KEY='' \ +--from-literal=SEAFILE_MYSQL_DB_PASSWORD='' \ +--from-literal=INIT_SEAFILE_ADMIN_PASSWORD='' \ +--from-literal=INIT_SEAFILE_MYSQL_ROOT_PASSWORD='' \ +--from-literal=REDIS_PASSWORD='' \ +--from-literal=S3_SECRET_KEY='' \ +--from-literal=S3_SSE_C_KEY='' +``` + ## Download K8S YAML files for Seafile cluster (without frontend node) ```sh @@ -30,7 +45,6 @@ wget -P /opt/seafile-k8s-yaml https://manual.seafile.com/13.0/repo/k8s/cluster/s wget -P /opt/seafile-k8s-yaml https://manual.seafile.com/13.0/repo/k8s/cluster/seafile-persistentvolumeclaim.yaml wget -P /opt/seafile-k8s-yaml https://manual.seafile.com/13.0/repo/k8s/cluster/seafile-service.yaml wget -P /opt/seafile-k8s-yaml https://manual.seafile.com/13.0/repo/k8s/cluster/seafile-env.yaml -wget -P /opt/seafile-k8s-yaml https://manual.seafile.com/13.0/repo/k8s/cluster/seafile-secret.yaml ``` @@ -43,7 +57,14 @@ In here we suppose you download the YAML files in `/opt/seafile-k8s-yaml`, which For futher configuration details, you can refer [the official documents](https://kubernetes.io/docs/tasks/configure-pod-container/). -## Modify `seafile-env.yaml` and `seafile-secret.yaml` +!!! tip "Use PV bound from a storage class" + If you would like to use automatically allocated persistent volume (PV) by a storage class, please modify `seafile-persistentvolumeclaim.yaml` and specify `storageClassName`. On the other hand, the PV defined by `seafile-persistentvolume.yaml` can be disabled: + + ```sh + rm /opt/seafile-k8s-yaml/seafile-persistentvolume.yaml + ``` + +## Modify `seafile-env.yaml` Similar to Docker-base deployment, Seafile cluster in K8S deployment also supports use files to configure startup progress, you can modify common [environment variables](./setup_pro_by_docker.md#downloading-and-modifying-env) by @@ -51,22 +72,6 @@ Similar to Docker-base deployment, Seafile cluster in K8S deployment also suppor nano /opt/seafile-k8s-yaml/seafile-env.yaml ``` -and sensitive information (e.g., password) by - -```sh -nano /opt/seafile-k8s-yaml/seafile-secret.yaml -``` - -!!! note "For `seafile-secret.yaml`" - To modify sensitive information (e.g., password), you need to convert the password into base64 encoding before writing it into the `seafile-secret.yaml` file: - - ```sh - echo -n '' | base64 - ``` - -!!! warning - For the fields marked with `<...>` are **required**, please make sure these items are filled in, otherwise Seafile server may not run properly. - ## Initialize Seafile cluster You can use following command to initialize Seafile cluster now (the Seafile's K8S resources will be specified in namespace `seafile` for easier management): @@ -138,7 +143,11 @@ Finally you can use the `tar -zcvf` and `tar -zxvf` commands to package the enti wget -P /opt/seafile-k8s-yaml https://manual.seafile.com/13.0/repo/k8s/cluster/seafile-frontend-deployment.yaml ``` -2. Modify `seafile-env.yaml`, and set `CLUSTER_INIT_MODE` to `false` (i.e., disable initialization mode) +2. Modify `seafile-env.yaml`, and set `CLUSTER_INIT_MODE` to `false` (i.e., disable initialization mode), then re-apply `seafile-env.yaml` again: + + ```sh + kubectl apply -f /opt/seafile-k8s-yaml + ``` 3. Run the following command to restart pods to restart Seafile cluster: diff --git a/manual/setup/helm_chart_cluster.md b/manual/setup/helm_chart_cluster.md index 9eff4089..898d5c65 100644 --- a/manual/setup/helm_chart_cluster.md +++ b/manual/setup/helm_chart_cluster.md @@ -318,7 +318,7 @@ Seafile Helm Chart is designed to provide fast deployment and version control. Y 2. Download (optional) and modify the new `my-values.yaml` ```sh - wget -O my-values.yaml https://haiwen.github.io/seafile-helm-chart/values//cluster.yaml + wget -O my-values.yaml https://haiwen.github.io/seafile-helm-chart/values//cluster.yaml nano my-values.yaml ``` diff --git a/manual/setup/helm_chart_single_node.md b/manual/setup/helm_chart_single_node.md index ed8f7ce8..9880e3d1 100644 --- a/manual/setup/helm_chart_single_node.md +++ b/manual/setup/helm_chart_single_node.md @@ -27,6 +27,8 @@ Please refer [here](./system_requirements.md) for the details of system requirem === "Seafile Pro" ```sh + kubectl create ns seafile + kubectl create secret generic seafile-secret --namespace seafile \ --from-literal=JWT_PRIVATE_KEY='' \ --from-literal=SEAFILE_MYSQL_DB_PASSWORD='' \ @@ -34,11 +36,13 @@ Please refer [here](./system_requirements.md) for the details of system requirem --from-literal=INIT_SEAFILE_MYSQL_ROOT_PASSWORD='' \ --from-literal=REDIS_PASSWORD='' \ --from-literal=S3_SECRET_KEY='' \ - --from-literal=S3_SSE_C_KEY='' + --from-literal=S3_SSE_C_KEY='' ``` === "Seafile CE" ```sh + kubectl create ns seafile + kubectl create secret generic seafile-secret --namespace seafile \ --from-literal=JWT_PRIVATE_KEY='' \ --from-literal=SEAFILE_MYSQL_DB_PASSWORD='' \ @@ -195,13 +199,13 @@ Seafile Helm Chart is designed to provide fast deployment and version control. Y === "Seafile Pro" ```sh - wget -O my-values.yaml https://haiwen.github.io/seafile-helm-chart/values//cluster.yaml + wget -O my-values.yaml https://haiwen.github.io/seafile-helm-chart/values//pro.yaml nano my-values.yaml ``` === "Seafile CE" ```sh - wget -O my-values.yaml https://haiwen.github.io/seafile-helm-chart/values//cluster.yaml + wget -O my-values.yaml https://haiwen.github.io/seafile-helm-chart/values//ce.yaml nano my-values.yaml ``` diff --git a/manual/setup/k8s_advanced_management.md b/manual/setup/k8s_advanced_management.md index 01a03eea..0bb1c684 100644 --- a/manual/setup/k8s_advanced_management.md +++ b/manual/setup/k8s_advanced_management.md @@ -35,10 +35,10 @@ kubectl delete pods -n seafile $(kubectl get pods -n seafile -o jsonpath='{.item ## K8S Gateway and HTTPS -Since the Ingress feature [is no longer supported](https://kubernetes.io/docs/concepts/services-networking/ingress/) in the new version of K8S (even the commonly used *Nginx-Ingress* will not be deployed after 1.24), this article will introduce how to use the new version of K8S feature [*K8S Gateway*](https://kubernetes.io/docs/concepts/services-networking/gateway/) to implement Seafile service exposure and load balancing. +Since the support of Ingress feature [is frozen](https://kubernetes.io/docs/concepts/services-networking/ingress/) in the new version of K8S, this article will introduce how to use the new version of K8S feature [*K8S Gateway*](https://kubernetes.io/docs/concepts/services-networking/gateway/) to implement Seafile service exposure and load balancing. !!! tip "Still use *Nginx-Ingress*" - If your K8S is still running with an old version, and still using *Nginx-Ingress*, you can follow [here](https://artifacthub.io/packages/helm/datamate/seafile#deploy-an-ingress-controller-ingress-nginx) to setup ingress controller and HTTPS. We sincerely thanks *Datamate* to give an example to this configuration. + If your K8S is still using *Nginx-Ingress*, you can follow [here](https://artifacthub.io/packages/helm/datamate/seafile#deploy-an-ingress-controller-ingress-nginx) to setup ingress controller and HTTPS. We sincerely thanks *Datamate* to give an example to this configuration. For the details and features about ***K8S Gateway***, please refer to the K8S [official document](https://kubernetes.io/docs/concepts/services-networking/gateway/#design-principles), you can simpily install it by diff --git a/manual/setup/k8s_single_node.md b/manual/setup/k8s_single_node.md index 4385ed4e..15dc368c 100644 --- a/manual/setup/k8s_single_node.md +++ b/manual/setup/k8s_single_node.md @@ -14,6 +14,35 @@ For persisting data using in the docker-base deployment, `/opt/seafile-data`, is By the way, we don't provide the deployment methods of basic services (e.g., **Redis**, **MySQL** and **Elasticsearch**) and seafile-compatibility components (e.g., **SeaDoc**) for K8S in our document. If you need to install these services in K8S format, ***you can refer to the rewrite method of this document.*** +## Create namespace and secretMap + +=== "Seafile Pro" + + ```sh + kubectl create ns seafile + + kubectl create secret generic seafile-secret --namespace seafile \ + --from-literal=JWT_PRIVATE_KEY='' \ + --from-literal=SEAFILE_MYSQL_DB_PASSWORD='' \ + --from-literal=INIT_SEAFILE_ADMIN_PASSWORD='' \ + --from-literal=INIT_SEAFILE_MYSQL_ROOT_PASSWORD='' \ + --from-literal=REDIS_PASSWORD='' \ + --from-literal=S3_SECRET_KEY='' \ + --from-literal=S3_SSE_C_KEY='' + ``` +=== "Seafile CE" + + ```sh + kubectl create ns seafile + + kubectl create secret generic seafile-secret --namespace seafile \ + --from-literal=JWT_PRIVATE_KEY='' \ + --from-literal=SEAFILE_MYSQL_DB_PASSWORD='' \ + --from-literal=INIT_SEAFILE_ADMIN_PASSWORD='' \ + --from-literal=INIT_SEAFILE_MYSQL_ROOT_PASSWORD='' \ + --from-literal=REDIS_PASSWORD='' + ``` + ## Down load the YAML files for Seafile Server === "Pro edition" @@ -26,7 +55,6 @@ By the way, we don't provide the deployment methods of basic services (e.g., **R wget -P /opt/seafile-k8s-yaml https://manual.seafile.com/13.0/repo/k8s/pro/seafile-persistentvolumeclaim.yaml wget -P /opt/seafile-k8s-yaml https://manual.seafile.com/13.0/repo/k8s/pro/seafile-service.yaml wget -P /opt/seafile-k8s-yaml https://manual.seafile.com/13.0/repo/k8s/pro/seafile-env.yaml - wget -P /opt/seafile-k8s-yaml https://manual.seafile.com/13.0/repo/k8s/pro/seafile-secret.yaml ``` === "Community edition" @@ -39,7 +67,6 @@ By the way, we don't provide the deployment methods of basic services (e.g., **R wget -P /opt/seafile-k8s-yaml https://manual.seafile.com/13.0/repo/k8s/ce/seafile-persistentvolumeclaim.yaml wget -P /opt/seafile-k8s-yaml https://manual.seafile.com/13.0/repo/k8s/ce/seafile-service.yaml wget -P /opt/seafile-k8s-yaml https://manual.seafile.com/13.0/repo/k8s/ce/seafile-env.yaml - wget -P /opt/seafile-k8s-yaml https://manual.seafile.com/13.0/repo/k8s/ce/seafile-secret.yaml ``` In here we suppose you download the YAML files in `/opt/seafile-k8s-yaml`, which mainly include about: @@ -49,9 +76,16 @@ In here we suppose you download the YAML files in `/opt/seafile-k8s-yaml`, which - `seafile-persistentVolume.yaml` for defining the location of a volume used for persistent storage on the host - `seafile-persistentvolumeclaim.yaml` for declaring the use of persistent storage in the container. +!!! tip "Use PV bound from a storage class" + If you would like to use automatically allocated persistent volume (PV) by a storage class, please modify `seafile-persistentvolumeclaim.yaml` and specify `storageClassName`. On the other hand, the PV defined by `seafile-persistentvolume.yaml` can be disabled: + + ```sh + rm /opt/seafile-k8s-yaml/seafile-persistentvolume.yaml + ``` + For futher configuration details, you can refer [the official documents](https://kubernetes.io/docs/tasks/configure-pod-container/). -## Modify `seafile-env.yaml` and `seafile-secret.yaml` +## Modify `seafile-env.yaml` Similar to Docker-base deployment, Seafile cluster in K8S deployment also supports use files to configure startup progress, you can modify common [environment variables](./setup_pro_by_docker.md#downloading-and-modifying-env) by @@ -59,19 +93,6 @@ Similar to Docker-base deployment, Seafile cluster in K8S deployment also suppor nano /opt/seafile-k8s-yaml/seafile-env.yaml ``` -and sensitive information (e.g., password) by - -```sh -nano /opt/seafile-k8s-yaml/seafile-secret.yaml -``` - -!!! note "For `seafile-secret.yaml`" - To modify sensitive information (e.g., password), you need to convert the password into base64 encoding before writing it into the `seafile-secret.yaml` file: - - ```sh - echo -n '' | base64 - ``` - !!! warning For the fields marked with `<...>` are **required**, please make sure these items are filled in, otherwise Seafile server may not run properly. diff --git a/manual/setup/setup_ce_by_docker.md b/manual/setup/setup_ce_by_docker.md index 1fdda873..ee5dee30 100644 --- a/manual/setup/setup_ce_by_docker.md +++ b/manual/setup/setup_ce_by_docker.md @@ -79,7 +79,7 @@ docker compose up -d You must run the above command in the directory with the `.env`. If `.env` file is elsewhere, please run ```sh - docker compose -f /path/to/.env up -d + docker compose --env-file /path/to/.env up -d ``` !!! success @@ -173,12 +173,12 @@ To monitor container logs (from outside of the container), please use the follow # if the `.env` file is in current directory: docker compose logs --follow # if the `.env` file is elsewhere: -docker compose -f /path/to/.env logs --follow +docker compose --env-file /path/to/.env logs --follow # you can also specify container name: docker compose logs seafile --follow # or, if the `.env` file is elsewhere: -docker compose -f /path/to/.env logs seafile --follow +docker compose --env-file /path/to/.env logs seafile --follow ``` The Seafile logs are under `/shared/logs/seafile` in the docker, or `/opt/seafile-data/logs/seafile` in the server that run the docker. diff --git a/manual/setup/setup_pro_by_docker.md b/manual/setup/setup_pro_by_docker.md index bdae8754..aa0e8729 100644 --- a/manual/setup/setup_pro_by_docker.md +++ b/manual/setup/setup_pro_by_docker.md @@ -121,7 +121,7 @@ docker compose up -d You must run the above command in the directory with the `.env`. If `.env` file is elsewhere, please run ```sh - docker compose -f /path/to/.env up -d + docker compose --env-file /path/to/.env up -d ``` !!! success diff --git a/manual/upgrade/upgrade_notes_for_12.0.x.md b/manual/upgrade/upgrade_notes_for_12.0.x.md index 9ed92ce6..0d654cb6 100644 --- a/manual/upgrade/upgrade_notes_for_12.0.x.md +++ b/manual/upgrade/upgrade_notes_for_12.0.x.md @@ -37,7 +37,8 @@ Breaking changes * For security reason, WebDAV no longer support login with LDAP account, the user with LDAP account must generate a WebDAV token at the profile page * [File tags] The current file tags feature is deprecated. We will re-implement a new one in version 13.0 with a new general metadata management module. * For ElasticSearch based search, full text search of doc/xls/ppt file types are no longer supported. This enable us to remove Java dependency in Seafile side. - +* The search dialog now support loading more items when scroll down and the original separate detailed file search page is no longer used +* The right side panel is redesigned and the seldom used file comments feature in the panel is removed Deploying Seafile with binary package is now deprecated and probably no longer be supported in version 13.0. We recommend you to migrate your existing Seafile deployment to docker based. @@ -83,7 +84,7 @@ Note, you should install Python libraries system wide using root user or sudo mo ## Upgrade to 12.0 (for binary installation) -The following instruction is for binary package based installation. If you use Docker based installation, please see [*Updgrade Docker*](./upgrade_docker.md) +The following instruction is for binary package based installation. If you use Docker based installation, please see [*Upgrade Docker*](./upgrade_docker.md) ### 1) Clean database tables before upgrade