Refactor docker and clean old apps
This commit is contained in:
@@ -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
|
||||
|
||||
15
alpine/apps/docker/stacks/portainer/compose.yaml
Normal file
15
alpine/apps/docker/stacks/portainer/compose.yaml
Normal 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:
|
||||
8
alpine/apps/docker/stacks/portainer/portainer.sh
Normal file
8
alpine/apps/docker/stacks/portainer/portainer.sh
Normal 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
|
||||
Reference in New Issue
Block a user