From 8d612f291e1f81b44ee6dc27056c88b45d2f3009 Mon Sep 17 00:00:00 2001 From: Gitouche <26656-gitouche@users.noreply.framagit.org> Date: Tue, 8 Nov 2022 21:21:44 +0000 Subject: [PATCH] Update README.md --- podman-gitea/README.md | 31 ++++++++++++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) diff --git a/podman-gitea/README.md b/podman-gitea/README.md index d8d5d12..c330f65 100644 --- a/podman-gitea/README.md +++ b/podman-gitea/README.md @@ -1,10 +1,35 @@ -To add a user (first admin or registration closed) : +# Gitea + +## Notes +Pour ajouter un utilisateur (premier compte admin ou si la création de comptes est désactivée) : ``` -podman exec --user 1000 gitea gitea admin user create --admin --username --password --email +podman exec --user git gitea gitea admin user create --admin --username --password --email ``` -Check after upgrade : +Vérification de la bonne santé de l'instance, à faire après chaque mise à jour : ``` podman exec --user git gitea gitea doctor --all --log-file "" ``` [Config cheat sheet](https://docs.gitea.io/en-us/config-cheat-sheet/) +## Restauration +À partir d'une copie des home utilisateur (volumes podman compris) dans `/backup` : +* En tant qu'utilisateur `podman-gitea` : +``` +podman volume create podman-gitea_gitea-data +podman volume create podman-gitea_gitea-pgsql +``` +* En tant que `root` : +``` +rsync -a /backup/home/podman-gitea/.local/share/containers/storage/volumes/podman-gitea_gitea-data/_data ~podman-gitea/.local/share/containers/storage/volumes/podman-gitea_gitea-data/ +rsync -a /backup/home/podman-gitea/.local/share/containers/storage/volumes/podman-gitea_gitea-pgsql/_data ~podman-gitea/.local/share/containers/storage/volumes/podman-gitea_gitea-pgsql/ + +chown -R podman-gitea:podman-users ~podman-gitea/.local/share/containers/storage/volumes/podman-gitea_gitea-data/_data +chown -R podman-gitea:podman-users ~podman-gitea/.local/share/containers/storage/volumes/podman-gitea_gitea-pgsql/ +``` +* En tant qu'utilisateur `podman-gitea` : +``` +podman unshare chown -R 999:999 ~/.local/share/containers/storage/volumes/podman-gitea_gitea-pgsql/_data +podman unshare chown -R 1000:1000 ~/.local/share/containers/storage/volumes/podman-gitea_gitea-data/_data/git +podman unshare chown -R 1000:1000 ~/.local/share/containers/storage/volumes/podman-gitea_gitea-data/_data/gitea +``` +* Exporter les variables d'environnement et procéder à l'installation normale (10_install.sh)