Seafile : nettoyage final! whooosh!
This commit is contained in:
parent
ad80f70349
commit
6089246a6c
|
@ -4,78 +4,23 @@ Créée le dimanche 17 janvier 2021
|
|||
Procédures
|
||||
----------
|
||||
|
||||
### Première installation
|
||||
SELinux pose des soucis lors des premières écritures sur les volumes. Lors de la toute première exécution - initialisation de l'espace, passer en
|
||||
|
||||
# AS ROOT
|
||||
setenforce 0
|
||||
# AS podman-user
|
||||
$ podman-compose up -d
|
||||
$ podman logs -f seafile # wait for init process ending
|
||||
$ podman pod stop podman-seafile
|
||||
# AS ROOT
|
||||
setenforce 1
|
||||
|
||||
### Bind sur 0.0.0.0 pour remonter la conf nginx sur l'hôte
|
||||
cd ~/.local/share/containers/storage/volumes/podman-seafile_seafile-data/_data/seafile/conf/
|
||||
|
||||
#### Dans gunicorn.conf.py
|
||||
bind = "0.0.0.0:8000"
|
||||
|
||||
#### Dans seafdav.conf
|
||||
[WEBDAV]
|
||||
port = 8080
|
||||
host = 0.0.0.0
|
||||
|
||||
#### Dans seafile.conf
|
||||
[fileserver]
|
||||
port = 8082
|
||||
host = 0.0.0.0
|
||||
|
||||
### email
|
||||
dans [~/.local/share/containers/storage/volumes/podman-seafile_seafile-data/_data/seafile/conf/seahub_settings.py](.local/share/containers/storage/volumes/podman-seafile_seafile-data/_data/seafile/conf/seahub_settings.py) , ajouter :
|
||||
|
||||
EMAIL_USE_TLS = False
|
||||
EMAIL_HOST = '192.168.128.10' # Utiliser la fonction get_default_iface_ipv4 varname
|
||||
EMAIL_HOST_USER = ''
|
||||
EMAIL_HOST_PASSWORD = ''
|
||||
EMAIL_PORT = 25
|
||||
DEFAULT_FROM_EMAIL = '[noreply@seafile.garbaye.fr](mailto:noreply@seafile.garbaye.fr)'
|
||||
SERVER_EMAIL = '[noreply@seafile.garbaye.fr](mailto:noreply@seafile.garbaye.fr)'
|
||||
|
||||
### soucis d'URL
|
||||
Changer les URL dans l'interface d'admin!!
|
||||
## Première installation
|
||||
### soucis d'URL
|
||||
À la première connexion en admin, changer les URL (https) dans l'interface d'administration.
|
||||
|
||||
Administrateur systeme
|
||||
SERVICE_URL
|
||||
|
||||
### Reconstruire le pod - conserver les données
|
||||
|
||||
# AS podman-user
|
||||
$ cd podman-seafile
|
||||
$ podman system renumber
|
||||
$ podman-compose up -d
|
||||
$ podman logs -f seafile # wait for process ending
|
||||
|
||||
### MAJ seafile suite maj image source officiel docker
|
||||
# as podman-seafile
|
||||
# <https://hub.docker.com/r/seafileltd/seafile-mc/tags?page=1&ordering=last_updated>
|
||||
# podman images --digests
|
||||
## MAJ seafile
|
||||
Modifier la version cible dans `vars.sh` (ici pour l'exemple : `8.0.8`)
|
||||
```
|
||||
cd /opt/services-garbaye/podman-seafile
|
||||
export GARBAYE_SEAFILE_MYSQL_ROOT_PASSWORD=XXXXXXXXXXXXXXXX
|
||||
podman pull docker.io/seafileltd/seafile-mc:8.0.8
|
||||
# maj la version dans docker-compose.yml
|
||||
systemctl --user stop pod-podman-seafile.service
|
||||
podman-compose down
|
||||
podman-compose up -d
|
||||
podman logs -f seafile # wait for process ending
|
||||
# as root
|
||||
/opt/services-garbaye/podman-seafile/update-seahub-media.sh
|
||||
# as podman-seafile
|
||||
podman generate systemd --files --name podman-seafile
|
||||
cp *.service [~/.config/systemd/user/](.config/systemd/user)
|
||||
podman pod stop podman-seafile
|
||||
systemctl --user daemon-reload
|
||||
systemctl --user enable --now pod-podman-seafile.service
|
||||
podman logs -f seafile # wait for process ending
|
||||
|
||||
./40_stop.sh
|
||||
./70_disable.sh
|
||||
./80_destroy.sh
|
||||
./10_install.sh
|
||||
./20_enable.sh
|
||||
./30_start.sh
|
||||
```
|
||||
|
|
|
@ -1,19 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
if [[ $EUID -ne 0 ]]; then
|
||||
echo "This script must be run as root"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
rm -rf /tmp/seahub
|
||||
su - podman-seafile -c "podman cp seafile:/opt/seafile/seafile-server-latest/seahub /tmp"
|
||||
mkdir -p /var/www/seafile/seafile-server-latest/
|
||||
|
||||
rm -rf /var/www/seafile/seafile-server-latest/seahub
|
||||
mv -v /tmp/seahub /var/www/seafile/seafile-server-latest/
|
||||
|
||||
rm -rf /var/www/seafile/seahub-data
|
||||
rsync -av --exclude 'thumbnail' ~podman-seafile/.local/share/containers/storage/volumes/podman-seafile_seafile-data/_data/seafile/seahub-data /var/www/seafile/
|
||||
|
||||
restorecon -RF /var/www/seafile
|
||||
chown -R nginx:nginx /var/www/seafile
|
Loading…
Reference in a new issue