diff --git a/webtop/.env b/webtop/.env new file mode 100755 index 0000000..a9ecade --- /dev/null +++ b/webtop/.env @@ -0,0 +1,12 @@ +#GLOBAL SETTINGS +COMPOSE_HTTP_TIMEOUT=120 +COMPOSE_IGNORE_ORPHANS=1 +DOCKER_CONFIGS=. +DOCKERGID=999 +DOCKERHOSTNAME=DockerServer +DOCKERLOGGING_MAXFILE=10 +DOCKERLOGGING_MAXSIZE=200k +PGID=1000 +PUID=1000 +UMASK=000 +TZ=America/Chicago diff --git a/webtop/compose.yml b/webtop/compose.yml new file mode 100644 index 0000000..0171c22 --- /dev/null +++ b/webtop/compose.yml @@ -0,0 +1,28 @@ +services: + webtop: + container_name: webtop + image: lscr.io/linuxserver/webtop:debian-xfce + environment: + - PUID=1000 + - PGID=1000 + - TZ=America/Chicago + - CUSTOM_USER=akanealw + - PASSWORD=kai5okee4quoy4cool7aeV8Muivait + - TITLE=Webtop + networks: + - reverse-proxy + security_opt: + - seccomp:unconfined + ports: + - 3003:3001 + shm_size: 1gb + restart: unless-stopped + volumes: + - ./config:/config + - ./scripts:/custom-cont-init.d:ro + - /var/run/docker.sock:/var/run/docker.sock #optional + +networks: + reverse-proxy: + external: true + \ No newline at end of file diff --git a/webtop/scripts/install.sh b/webtop/scripts/install.sh new file mode 100644 index 0000000..292322a --- /dev/null +++ b/webtop/scripts/install.sh @@ -0,0 +1,49 @@ +#!/bin/bash + +# autoreply config update dialog with default answer no +if [[ ! -f /etc/apt/apt.conf.d/local ]] + then + echo "Dpkg::Options {" >> /etc/apt/apt.conf.d/local + echo " "--force-confdef";" >> /etc/apt/apt.conf.d/local + echo " "--force-confold";" >> /etc/apt/apt.conf.d/local + echo "}" >> /etc/apt/apt.conf.d/local +fi + +# update docker key +sudo apt-get install ca-certificates curl +sudo install -m 0755 -d /etc/apt/keyrings +sudo curl -fsSL https://download.docker.com/linux/debian/gpg -o /etc/apt/keyrings/docker.asc +sudo chmod a+r /etc/apt/keyrings/docker.asc +echo \ + "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/debian \ + $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \ + sudo tee /etc/apt/sources.list.d/docker.list > /dev/null + +# update and install apps +apt-get update +DEBIAN_FRONTEND=noninteractive apt-get upgrade -y +DEBIAN_FRONTEND=noninteractive apt-get install -y gnome-themes-extra xfce4-whiskermenu-plugin git nano wget curl ncdu pwgen + +# set git config +git config --global user.name "akanealw" +git config --global user.email "akanealw@gmail.com" +git config --global init.defaultBranch main +git config --global credential.helper store + +# add aliases +echo "alias lsa='ls -alhvF'" >> /etc/bash.bashrc +echo "alias aptupy='sudo apt update && sudo apt upgrade -y'" >> /etc/bash.bashrc +echo "alias aptiy='sudo apt install -y'" >> /etc/bash.bashrc +echo "alias aptry='sudo apt remove -y'" >> /etc/bash.bashrc +echo "alias aptrpy='sudo apt remove --purge -y'" >> /etc/bash.bashrc +echo "alias aptary='sudo apt autoremove -y'" >> /etc/bash.bashrc +echo "alias apts='sudo apt search'" >> /etc/bash.bashrc + +# set input preferences +if [[ ! -f /etc/inputrc.default ]] + then wget -qO /etc/inputrc.default http://192.168.1.50/files/debian/inputrc.default +fi +rm /etc/inputrc > /dev/null 2>&1 +cp /etc/inputrc.default /etc/inputrc +echo "" >> /etc/inputrc +echo "set completion-ignore-case On" >> /etc/inputrc