From 88869ebb2016913360e535e36cdae83010de1db1 Mon Sep 17 00:00:00 2001 From: skywalker Date: Tue, 24 Dec 2024 14:34:10 +0800 Subject: [PATCH] update non root --- ...un_seafile_as_non_root_user_inside_docker.md | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/manual/setup/run_seafile_as_non_root_user_inside_docker.md b/manual/setup/run_seafile_as_non_root_user_inside_docker.md index 6fda8866..0a11a163 100644 --- a/manual/setup/run_seafile_as_non_root_user_inside_docker.md +++ b/manual/setup/run_seafile_as_non_root_user_inside_docker.md @@ -1,8 +1,14 @@ # Run Seafile as non root user inside docker -You can use run seafile as non root user in docker. +You can use run Seafile as non root user in docker. -First add the `NON_ROOT=true` to the `.env`. +First deploy Seafile with docker, and destroy the containers. + +```bash +docker compose down +``` + +Then add the `NON_ROOT=true` to the `.env`. ```env NON_ROOT=true @@ -14,14 +20,13 @@ Then modify `/opt/seafile-data/seafile/` permissions. chmod -R a+rwx /opt/seafile-data/seafile/ ``` -Then destroy the containers and run them again: +Start Seafile: ```bash -docker compose down docker compose up -d ``` -Now you can run Seafile as `seafile` user. +Now you can run Seafile as `seafile` user. !!! tip - When doing maintenance, other scripts in docker are also required to be run as `seafile` user, e.g. `su seafile -c ./seaf-gc.sh` \ No newline at end of file + When doing maintenance, other scripts in docker are also required to be run as `seafile` user, e.g. `su seafile -c ./seaf-gc.sh`