mirror of
https://gitlab.com/Snogard/kaido.git
synced 2025-06-25 02:13:00 +02:00
removed old vaultwarden wips
This commit is contained in:
parent
248f82cf84
commit
f7c45e4e5f
@ -1,34 +0,0 @@
|
||||
#!/bin/bash
|
||||
source /opt/kaido/src/libs/bash/lib.sh
|
||||
|
||||
# setup
|
||||
imageName=docker.io/vaultwarden/server:1.31.0-alpine
|
||||
containerName=vaultwarden
|
||||
|
||||
dstBasePath="$KAIDO_CONTAINER_FOLDER/$containerName"
|
||||
dstDataPath="$dstBasePath/data"
|
||||
|
||||
# envs
|
||||
|
||||
if [ -f "$KAIDO_CONFIG_FOLDER/containers/$containerName/envs.sh" ]; then
|
||||
source "$KAIDO_CONFIG_FOLDER/containers/$containerName/envs.sh"
|
||||
fi
|
||||
|
||||
|
||||
# pre install
|
||||
create_folder "$dstDataPath"
|
||||
stop_and_remove_container $containerName
|
||||
|
||||
|
||||
# install
|
||||
echo "Creating new container"
|
||||
podman create \
|
||||
--name $containerName \
|
||||
-p 10114:80 \
|
||||
-v $dstDataPath:/data \
|
||||
$imageName
|
||||
|
||||
|
||||
# systemd
|
||||
create_systemd_services $containerName
|
||||
systemctl --user enable --now $containerName
|
@ -1,74 +0,0 @@
|
||||
#!/bin/bash
|
||||
source /opt/kaido/src/libs/bash/lib.sh
|
||||
|
||||
# setup
|
||||
imageName_web=docker.io/vaultwarden/server:1.31.0-alpine
|
||||
imageName_db=docker.io/library/mariadb:11.4.2
|
||||
|
||||
podName=vaultwarden
|
||||
|
||||
containerName_web=${podName}_web
|
||||
containerName_db=${podName}_db
|
||||
|
||||
dstBasePath="$KAIDO_CONTAINER_FOLDER/$podName"
|
||||
dstDBPath="$dstBasePath/db"
|
||||
dstDataPath="$dstBasePath/data"
|
||||
|
||||
# envs
|
||||
|
||||
if [ -f "$KAIDO_CONFIG_FOLDER/containers/$podName/envs.sh" ]; then
|
||||
source "$KAIDO_CONFIG_FOLDER/containers/$podName/envs.sh"
|
||||
fi
|
||||
|
||||
if [ ! -f "$KAIDO_CONFIG_FOLDER/containers/$podName/$containerName_db.env" ]; then
|
||||
echo "Error: missing $containerName_db.env file in the container configuration folder;
|
||||
Add the following variables to the file:
|
||||
MARIADB_ROOT_PASSWORD=<your root password>
|
||||
MARIADB_PASSWORD=<your db_password>
|
||||
MARIADB_USER=<your db_user>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! -f "$KAIDO_CONFIG_FOLDER/containers/$podName/$containerName_web.env" ]; then
|
||||
echo "Error: missing $containerName_web.env file in the container configuration folder;
|
||||
Add the following variables to the file:
|
||||
DATABASE_URL=mysql://<db_user>:<db_pw>@$containerName_db/vaultwarden
|
||||
ADMIN_TOKEN=<your token>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
# pre install
|
||||
create_folder "$dstBasePath"
|
||||
stop_and_remove_pod $podName
|
||||
|
||||
|
||||
#install
|
||||
echo "Creating new $podName pod"
|
||||
podman pod create \
|
||||
--name $podName \
|
||||
-p 10114:80/tcp \
|
||||
|
||||
echo "Creating new $containerName_db container"
|
||||
podman create \
|
||||
--pod $podName \
|
||||
--name $containerName_db \
|
||||
-v $dstDBPath:/var/lib/mysql \
|
||||
-v /etc/localtime:/etc/localtime:ro \
|
||||
-e "MARIADB_DATABASE=vaultwarden" \
|
||||
--env-file="$KAIDO_CONFIG_FOLDER/containers/$podName/$containerName_db.env" \
|
||||
$imageName_db
|
||||
|
||||
echo "Creating new $containerName_web container"
|
||||
podman create \
|
||||
--pod $podName \
|
||||
--name $containerName_web \
|
||||
--requires $containerName_db \
|
||||
-v $dstDataPath:/data \
|
||||
-e "RUST_BACKTRACE=1" \
|
||||
--env-file="$KAIDO_CONFIG_FOLDER/containers/$podName/$containerName_web.env" \
|
||||
$imageName_web
|
||||
|
||||
# systemd
|
||||
create_systemd_services $containerName
|
||||
systemctl --user enable --now $containerName
|
Loading…
x
Reference in New Issue
Block a user