Seafile : Work in Progress ajout 05 10
This commit is contained in:
parent
75c6e61950
commit
99b471c371
25
podman-seafile/05_freshinstall.sh
Executable file
25
podman-seafile/05_freshinstall.sh
Executable file
|
@ -0,0 +1,25 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
ABSDIR="$( dirname "$(readlink -f -- "$0")" )"
|
||||||
|
source ${ABSDIR}/../functions.sh
|
||||||
|
source ${ABSDIR}/vars.sh
|
||||||
|
|
||||||
|
ensure_pwd_is_scriptdir
|
||||||
|
ensure_not_root
|
||||||
|
|
||||||
|
ensure_variables_are_defined "$envvars"
|
||||||
|
|
||||||
|
if [[ -d ~/.local/share/containers/storage/volumes/${dbvolume} ]]; then
|
||||||
|
echo "Error : conf volume ${dbvolume} already exists."
|
||||||
|
echo "Please remove it before a freshinstall, or continue with a standard installation."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ -d ~/.local/share/containers/storage/volumes/${datavolume} ]]; then
|
||||||
|
echo "Error : data volume ${datavolume} already exists."
|
||||||
|
echo "Please remove it before a freshinstall, or continue with a standard installation."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
podman volume create ${dbvolume}
|
||||||
|
podman volume create ${datavolume}
|
45
podman-seafile/10_install.sh
Executable file
45
podman-seafile/10_install.sh
Executable file
|
@ -0,0 +1,45 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
ABSDIR="$( dirname "$(readlink -f -- "$0")" )"
|
||||||
|
source ${ABSDIR}/../functions.sh
|
||||||
|
source ${ABSDIR}/vars.sh
|
||||||
|
|
||||||
|
ensure_pwd_is_scriptdir
|
||||||
|
ensure_not_root
|
||||||
|
|
||||||
|
ensure_variables_are_defined "$envvars"
|
||||||
|
|
||||||
|
if [[ ! -d ~/.local/share/containers/storage/volumes/${dbvolume} ]]; then
|
||||||
|
echo "Error : conf volume ${dbvolume} does not exists. Consider running 05_freshinstall.sh if this is the first install."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ ! -d ~/.local/share/containers/storage/volumes/${datavolume} ]]; then
|
||||||
|
echo "Error : data volume ${datavolume} does not exists. Consider running 05_freshinstall.sh if this is the first install."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
cat <<EOT >> .env
|
||||||
|
MYSQL_ROOT_PASSWORD=${GARBAYE_SEAFILE_MYSQL_ROOT_PASSWORD}
|
||||||
|
DB_ROOT_PASSWD=${GARBAYE_SEAFILE_MYSQL_ROOT_PASSWORD}
|
||||||
|
SEAFILE_ADMIN_PASSWORD=${GARBAYE_SEAFILE_ADMIN_PASSWORD}
|
||||||
|
SEAFILE_SERVER_HOSTNAME=${GARBAYE_SEAFILE_SERVER_HOSTNAME}
|
||||||
|
SEAFILE_ADMIN_EMAIL=${GARBAYE_SEAFILE_ADMIN_EMAIL}
|
||||||
|
EOT
|
||||||
|
|
||||||
|
export GARBAYE_SEAFILE_SEAFILE_VERSION="${seafile_release}"
|
||||||
|
podman-compose up -d
|
||||||
|
|
||||||
|
echo -n "Waiting for seahub_settings.py "
|
||||||
|
while [ ! -e `podman volume inspect --format '{{ .Mountpoint }}' ${datavolume}`/seafile/conf/seahub_settings.py ]; do
|
||||||
|
echo -n "."
|
||||||
|
sleep 1
|
||||||
|
done ; echo "OK"
|
||||||
|
|
||||||
|
sed_in_place "^FILE_SERVER_ROOT = \"http://${GARBAYE_SEAFILE_SERVER_HOSTNAME}/seafhttp\"" "FILE_SERVER_ROOT = \"https://${GARBAYE_SEAFILE_SERVER_HOSTNAME}/seafhttp\"\nEMAIL_USE_TLS = False\nEMAIL_HOST = '${GARBAYE_SEAFILE_SMTP_SERVER}'\nEMAIL_HOST_USER = ''\nEMAIL_HOST_PASSWORD = ''\nEMAIL_PORT = 25\nDEFAULT_FROM_EMAIL = 'noreply@seafile.garbaye.fr'\nSERVER_EMAIL = 'noreply@seafile.garbaye.fr'" `podman volume inspect --format '{{ .Mountpoint }}' ${datavolume}`/seafile/conf/seahub_settings.py
|
||||||
|
|
||||||
|
shred -u .env
|
||||||
|
|
||||||
|
./40_stop.sh
|
||||||
|
|
||||||
|
echo All good : pod ${pod_name} built and stopped
|
|
@ -2,12 +2,13 @@ version: '2.0'
|
||||||
services:
|
services:
|
||||||
db:
|
db:
|
||||||
image: docker.io/library/mariadb:10.2
|
image: docker.io/library/mariadb:10.2
|
||||||
container_name: seafile-mysql
|
container_name: seafile-db
|
||||||
environment:
|
environment:
|
||||||
- MYSQL_ROOT_PASSWORD=${GARBAYE_SEAFILE_MYSQL_ROOT_PASSWORD} # Requested, set the root's password of MySQL service.
|
|
||||||
- MYSQL_LOG_CONSOLE=true
|
- MYSQL_LOG_CONSOLE=true
|
||||||
|
env_file:
|
||||||
|
- .env
|
||||||
volumes:
|
volumes:
|
||||||
- seafile-mysql:/var/lib/mysql:Z # Requested, specifies the path to MySQL data persistent store.
|
- seafile-db:/var/lib/mysql:Z
|
||||||
networks:
|
networks:
|
||||||
- seafile-net
|
- seafile-net
|
||||||
|
|
||||||
|
@ -19,22 +20,18 @@ services:
|
||||||
- seafile-net
|
- seafile-net
|
||||||
|
|
||||||
seafile:
|
seafile:
|
||||||
image: docker.io/seafileltd/seafile-mc:8.0.8
|
image: "docker.io/seafileltd/seafile-mc:${GARBAYE_SEAFILE_SEAFILE_VERSION}"
|
||||||
container_name: seafile
|
container_name: seafile
|
||||||
ports:
|
ports:
|
||||||
- "127.0.0.1:8000:8000"
|
- "127.0.0.1:8000:80"
|
||||||
- "127.0.0.1:8080:8080"
|
|
||||||
- "127.0.0.1:8082:8082"
|
|
||||||
volumes:
|
volumes:
|
||||||
- seafile-data:/shared:Z # Requested, specifies the path to Seafile data persistent store.
|
- seafile-data:/shared:Z
|
||||||
environment:
|
environment:
|
||||||
- DB_HOST=db
|
- DB_HOST=db
|
||||||
- DB_ROOT_PASSWD=${GARBAYE_SEAFILE_MYSQL_ROOT_PASSWORD} # Requested, the value shuold be root's password of MySQL service.
|
- TIME_ZONE=Europe/Paris
|
||||||
- TIME_ZONE=Etc/UTC # Optional, default is UTC. Should be uncomment and set to your local time zone.
|
- SEAFILE_SERVER_LETSENCRYPT=false
|
||||||
- SEAFILE_ADMIN_EMAIL=laposte-seafile@garbaye.fr # Specifies Seafile admin user, default is 'me@example.com'.
|
env_file:
|
||||||
- SEAFILE_ADMIN_PASSWORD=${GARBAYE_SEAFILE_ADMIN_PASSWORD} # Specifies Seafile admin password, default is 'asecret'.
|
- .env
|
||||||
- SEAFILE_SERVER_LETSENCRYPT=false # Whether to use https or not.
|
|
||||||
- SEAFILE_SERVER_HOSTNAME=seafile.garbaye.fr # Specifies your host name if https is enabled.
|
|
||||||
depends_on:
|
depends_on:
|
||||||
- db
|
- db
|
||||||
- memcached
|
- memcached
|
||||||
|
|
|
@ -2,5 +2,11 @@
|
||||||
|
|
||||||
pod_name='podman-seafile'
|
pod_name='podman-seafile'
|
||||||
service_name="pod-${pod_name}.service"
|
service_name="pod-${pod_name}.service"
|
||||||
|
seafile_release='8.0.8'
|
||||||
|
dbvolume='podman-seafile_seafile-db'
|
||||||
|
datavolume='podman-seafile_seafile-data'
|
||||||
|
get_default_iface_ipv4 GARBAYE_SEAFILE_SMTP_SERVER
|
||||||
|
GARBAYE_SEAFILE_SERVER_HOSTNAME="${GARBAYE_SERVER_HOSTNAME:-seafile.garbaye.fr}"
|
||||||
|
GARBAYE_SEAFILE_ADMIN_EMAIL="${GARBAYE_SEAFILE_ENV_ADMIN_EMAIL:-laposte-seafile@garbaye.fr}"
|
||||||
|
envvars='GARBAYE_SEAFILE_MYSQL_ROOT_PASSWORD'
|
||||||
upstream_images="docker.io/seafileltd/seafile-mc docker.io/library/mariadb docker.io/library/memcached"
|
upstream_images="docker.io/seafileltd/seafile-mc docker.io/library/mariadb docker.io/library/memcached"
|
||||||
version='8.0.8'
|
|
||||||
|
|
Loading…
Reference in a new issue