Refactor docker and clean old apps

This commit is contained in:
2025-11-01 22:06:02 +01:00
parent 45afd634db
commit cad7c24295
6 changed files with 22 additions and 277 deletions

View File

@@ -1,5 +1,7 @@
#!/bin/dash
BASE_URL=${1}
mkdir /srv/stacks
mkdir /srv/data
@@ -13,3 +15,21 @@ apk add docker docker-cli-compose
rc-update add docker boot
service docker start
InstStacks() {
SEL=$(whiptail --title "More Apps" --checklist "" 0 0 0 \
"portainer" "" off \
"traefik" "" off \
"gitea" "" off 3>&1 1>&2 2>&3)
# shellcheck disable=SC2181
if [ "${?}" = "0" ]; then
for ITM in ${SEL}; do
cd /tmp || exit
# shellcheck disable=SC3000-SC4000
wget "${BASE_URL}"/alpine/apps/docker/stacks/"${ITM//\"/}"/"${ITM//\"/}".sh
# shellcheck disable=SC3000-SC4000
sh ./"${ITM//\"/}".sh "${BASE_URL}"
done
fi
}
InstStacks

View File

@@ -0,0 +1,15 @@
services:
portainer:
image: "portainer/portainer-ce:latest"
container_name: "portainer"
restart: unless-stopped
ports:
- 9443:9443
networks:
- bridge
volumes:
- "/var/run/docker.sock:/var/run/docker.sock"
- "/srv/data/portainer/data:/data"
networks:
bridge:

View File

@@ -0,0 +1,8 @@
#!/bin/dash
BASE_URL=https://git.netm.ch/m/os-init/raw/branch/main
mkdir /srv/stacks/portainer
cd /srv/stacks/portainer
wget "${BASE_URL}"/alpine/apps/portainer/compose.yaml
docker compose up -d