mirror of
https://gitlab.com/Snogard/kaido.git
synced 2025-08-20 10:50:06 +02:00
41 lines
954 B
Bash
Executable File
41 lines
954 B
Bash
Executable File
#!/bin/bash
|
|
source /opt/kaido/src/libs/bash/lib.sh
|
|
|
|
# setup
|
|
imageName=docker.io/gitea/gitea:1.23.5-rootless
|
|
containerName=gitea
|
|
|
|
dstDataPath="$KAIDO_CONTAINER_FOLDER/$containerName/data"
|
|
dstConfigPath="$KAIDO_CONTAINER_FOLDER/$containerName/config"
|
|
|
|
|
|
# envs
|
|
external_port=10119
|
|
ssh_external_port=2222 #not used
|
|
|
|
if [ -f "$KAIDO_CONFIG_FOLDER/containers/$containerName/envs.sh" ]; then
|
|
source "$KAIDO_CONFIG_FOLDER/containers/$containerName/envs.sh"
|
|
fi
|
|
|
|
|
|
# pre install
|
|
create_folder "$dstDataPath"
|
|
create_folder "$dstConfigPath"
|
|
stop_and_remove_container $containerName
|
|
|
|
|
|
# install
|
|
echo "Creating new container"
|
|
podman create \
|
|
--name $containerName \
|
|
-p $external_port:3000 \
|
|
-v $dstDataPath:/var/lib/gitea \
|
|
-v $dstConfigPath:/etc/gitea \
|
|
-v /etc/timezone:/etc/timezone:ro \
|
|
-v /etc/localtime:/etc/localtime:ro \
|
|
$imageName
|
|
|
|
|
|
# systemd
|
|
create_systemd_services $containerName
|
|
systemctl --user enable --now $containerName |