added envs trusted domain env to nextcloud, refactoring youtubedl

This commit is contained in:
Snogard 2023-07-26 21:03:53 +02:00
parent e964fdd38f
commit 5414c57faa
3 changed files with 17 additions and 12 deletions

View File

@ -29,6 +29,12 @@ dstThemePath=$dstBasePath/theme
dstDBConfigPath=$dstBasePath/db/config
dstDBDataPath=$dstBasePath/db/data
# envs
trusted_domains="localhost example.com"
if [ -f "/etc/kaido/containers/$podName/envs.sh" ]; then
source /etc/kaido/containers/$podName/envs.sh
fi
# pre install
create_folder "$dstNextcloudPath"
@ -69,6 +75,7 @@ podman create \
-v $dstConfigPath:/var/www/html/config \
-v $dstDataPath:/var/www/html/data \
-v $dstThemePath:/var/www/html/themes/custom \
-e NEXTCLOUD_TRUSTED_DOMAINS="$trused_domains" \
-e MYSQL_DATABASE=nextcloud \
-e MYSQL_USER=nextcloud \
-e MYSQL_PASSWORD=mariadb_password \

View File

@ -5,10 +5,10 @@ source /opt/kaido/src/libs/bash/lib.sh
# setup
podName=youtubedl
containerName_youtubedl=${podName}_web
containerName_db=${podName}_mongodb
containerName_web=${podName}_web
containerName_db=${podName}_db
imageName_youtubedl=docker.io/tzahi12345/youtubedl-material:4.3.2
imageName_web=docker.io/tzahi12345/youtubedl-material:4.3.2
imageName_db=docker.io/library/mongo:4.4.22
max_old_space_size=4096
@ -24,16 +24,15 @@ dstAppDataPath=$dstBasePath/appdata
dstUsersPath=$dstBasePath/users
dstDBPath=$dstBasePath/db
# pre install
# pre install
create_folder "$dstAppDataPath"
create_folder "$dstUsersPath"
create_folder "$dstDBPath"
stop_and_remove_pod $podName
#install
#install
echo "Creating new $podName pod"
podman pod create \
--name $podName \
@ -46,10 +45,10 @@ podman create \
-v $dstDBPath:/data/db \
$imageName_db
echo "Creating new $containerName_youtubedl container"
echo "Creating new $containerName_web container"
podman create \
--pod $podName \
--name $containerName_youtubedl \
--name $containerName_web \
--requires $containerName_db \
-v $dstAppDataPath:/app/appdata \
-v $dstUsersPath:/app/users \
@ -58,10 +57,9 @@ podman create \
-e write_ytdl_config=true \
-e ALLOW_CONFIG_MUTATIONS=true \
-e NODE_OPTIONS=" --max_old_space_size=$max_old_space_size" \
$imageName_youtubedl
$imageName_web
# systemd
create_systemd_services $podName
systemctl --user enable --now $podName

View File

@ -31,12 +31,12 @@ function create_systemd_services()
mkdir -p $HOME/.config/systemd/user
cd $HOME/.config/systemd/user
podman generate systemd --files --name \
podman generate systemd --files \
--restart-policy always \
--restart-sec 60 \
--pod-prefix "" \
--container-prefix "" \
$name
--name $name
}
function create_folder()