diff --git a/src/templates/install-container.sh b/src/templates/install/install-container.sh similarity index 78% rename from src/templates/install-container.sh rename to src/templates/install/install-container.sh index aeb448b..452008f 100644 --- a/src/templates/install-container.sh +++ b/src/templates/install/install-container.sh @@ -5,6 +5,8 @@ source /opt/kaido/src/libs/bash/lib.sh imageName=docker.io/ containerName= +envFile="$KAIDO_CONFIG_FOLDER/containers/$podName/$containerName.env" + dstBasePath="$KAIDO_CONTAINER_FOLDER/$containerName" # envs @@ -14,6 +16,10 @@ if [ -f "$KAIDO_CONFIG_FOLDER/containers/$containerName/envs.sh" ]; then fi +if [ ! -f "$envFile" ]; then + envFile="$KAIDO_EMPTY_ENV_FILE" +fi + # pre install create_folder "$dstBasePath" stop_and_remove_container $containerName @@ -24,6 +30,7 @@ echo "Creating new container" podman create \ --name $containerName \ -v $dstBasePath:/path/to/folder \ + --env-file="$envFile" \ $imageName diff --git a/src/templates/install-pod.sh b/src/templates/install/install-pod.sh similarity index 91% rename from src/templates/install-pod.sh rename to src/templates/install/install-pod.sh index 8ce86fa..57b65b7 100644 --- a/src/templates/install-pod.sh +++ b/src/templates/install/install-pod.sh @@ -46,5 +46,5 @@ podman create \ $imageName_web # systemd -create_systemd_services $containerName -systemctl --user enable --now $containerName \ No newline at end of file +create_systemd_services $podName +systemctl --user enable --now $podName \ No newline at end of file