From b977e199251d60fc2ad840af3e2d869f1c4330aa Mon Sep 17 00:00:00 2001 From: smayzy Date: Tue, 25 Feb 2025 23:27:34 +0100 Subject: [PATCH] init --- FreshRSS/compose.yaml | 12 ++++++ crafty/install.sh | 6 +++ cs2-server/before.md | 6 +++ cs2-server/install.sh | 16 ++++++++ cyberchef/compose.yaml | 6 +++ gitea/gitea | 12 ++++++ gitea/install.sh | 5 +++ jellyfin/install.sh | 1 + kutt/compose.yaml | 23 +++++++++++ mailinabox/install.sh | 1 + mirror/crontab | 1 + mirror/nginx.conf | 20 ++++++++++ mirror/rsync-update.sh | 67 ++++++++++++++++++++++++++++++++ nginx-proxy-manager/compose.yaml | 27 +++++++++++++ pihole/install.sh | 1 + pingvin-share/compose.yaml | 11 ++++++ qbittorrent/install.sh | 3 ++ uptime-kuma/compose.yaml | 9 +++++ vaultwarden/compose.yaml | 21 ++++++++++ 19 files changed, 248 insertions(+) create mode 100644 FreshRSS/compose.yaml create mode 100644 crafty/install.sh create mode 100644 cs2-server/before.md create mode 100644 cs2-server/install.sh create mode 100644 cyberchef/compose.yaml create mode 100644 gitea/gitea create mode 100644 gitea/install.sh create mode 100644 jellyfin/install.sh create mode 100644 kutt/compose.yaml create mode 100644 mailinabox/install.sh create mode 100644 mirror/crontab create mode 100644 mirror/nginx.conf create mode 100644 mirror/rsync-update.sh create mode 100644 nginx-proxy-manager/compose.yaml create mode 100644 pihole/install.sh create mode 100644 pingvin-share/compose.yaml create mode 100644 qbittorrent/install.sh create mode 100644 uptime-kuma/compose.yaml create mode 100644 vaultwarden/compose.yaml diff --git a/FreshRSS/compose.yaml b/FreshRSS/compose.yaml new file mode 100644 index 0000000..e19c25b --- /dev/null +++ b/FreshRSS/compose.yaml @@ -0,0 +1,12 @@ +services: + freshrss: + image: freshrss/freshrss:latest + container_name: freshrss + restart: always + environment: + TZ: "Europe/Paris" + volumes: + - ./data:/var/www/FreshRSS/data + - ./extensions:/var/www/FreshRSS/extensions + ports: + - 80:80 diff --git a/crafty/install.sh b/crafty/install.sh new file mode 100644 index 0000000..df003da --- /dev/null +++ b/crafty/install.sh @@ -0,0 +1,6 @@ +apt install git +git clone https://gitlab.com/crafty-controller/crafty-installer-4.0.git +cd crafty-installer-4.0 +sudo ./install_crafty.sh +sudo systemctl enable crafty +sudo systemctl start crafty diff --git a/cs2-server/before.md b/cs2-server/before.md new file mode 100644 index 0000000..b5928dd --- /dev/null +++ b/cs2-server/before.md @@ -0,0 +1,6 @@ +# Set ev + +# If possible use another account than the one you play with because you can't play on the same account with 2 different pc and the server count as one + +id = your_pseudo_steam + diff --git a/cs2-server/install.sh b/cs2-server/install.sh new file mode 100644 index 0000000..821f81d --- /dev/null +++ b/cs2-server/install.sh @@ -0,0 +1,16 @@ +apt install software-properties-common +add-apt-repository multiverse +dpkg --add-architecture i386 +apt update +apt install steamcmd +useradd -m steam +passwd steam +sudo -u steam -s +cd /home/steam +mkdir Steam +force_install_dir /home/steam/Steam +login $id +app_update 730 validate +mkdir /home/steam/.steam/sdk64 +ln -s /home/steam/.steam/steam/steamcmd/linux64/steamclient.so /home/steam/.steam/sdk64/ +./home/steam/Steam/game/bin/linuxsteamrt64/cs2 -dedicated +map de_dust2 diff --git a/cyberchef/compose.yaml b/cyberchef/compose.yaml new file mode 100644 index 0000000..ff1cf1f --- /dev/null +++ b/cyberchef/compose.yaml @@ -0,0 +1,6 @@ +service: + cyberchef: + image: ghcr.io/gchq/cyberchef:latest + restart: always + ports: + - 80:80 diff --git a/gitea/gitea b/gitea/gitea new file mode 100644 index 0000000..1a0c881 --- /dev/null +++ b/gitea/gitea @@ -0,0 +1,12 @@ +#!/sbin/openrc-run +name="Gitea" +description="Self-hosted Git service" +command="gitea" +command_args="web --config /etc/gitea/app.ini" +command_user="gitea:gitea" +supervisor="supervise-daemon" +pidfile="/run/gitea.pid" +directory="/var/lib/gitea" +depend() { + need net +} diff --git a/gitea/install.sh b/gitea/install.sh new file mode 100644 index 0000000..a900b4e --- /dev/null +++ b/gitea/install.sh @@ -0,0 +1,5 @@ +apk add gitea +rm /etc/init.d/gitea +cp gitea /etc/init.d/gitea +rc-update add gitea default +service gitea start diff --git a/jellyfin/install.sh b/jellyfin/install.sh new file mode 100644 index 0000000..6688271 --- /dev/null +++ b/jellyfin/install.sh @@ -0,0 +1 @@ +curl https://repo.jellyfin.org/install-debuntu.sh | bash diff --git a/kutt/compose.yaml b/kutt/compose.yaml new file mode 100644 index 0000000..3bcb970 --- /dev/null +++ b/kutt/compose.yaml @@ -0,0 +1,23 @@ +services: + kutt: + image: kutt/kutt:latest + volumes: + - ./db_data_sqlite:/var/lib/kutt + - ./custom:/kutt/custom + environment: + DB_FILENAME: "/var/lib/kutt/data.sqlite" + JWT_SECRET: "secret" + DEFAULT_DOMAIN: "example.com" + DISALLOW_ANONYMOUS_LINKS: "false" + CUSTOM_DOMAIN_USE_HTTPS: "true" + MAIL_ENABLED: "true" + MAIL_HOST: "mail.example.com" + MAIL_PORT: "465" + MAIL_USER: "no-reply" + MAIL_PASSWORD: "passwd" + MAIL_FROM: "no-reply@example.com" + MAIL_SECURE: "true" + REPORT_EMAIL: "admin@example.com" + CONTACT_EMAIL: "admin@example.com" + ports: + - 80:3000 diff --git a/mailinabox/install.sh b/mailinabox/install.sh new file mode 100644 index 0000000..dcd756f --- /dev/null +++ b/mailinabox/install.sh @@ -0,0 +1 @@ +curl -s https://mailinabox.email/setup.sh | bash diff --git a/mirror/crontab b/mirror/crontab new file mode 100644 index 0000000..d9a0d51 --- /dev/null +++ b/mirror/crontab @@ -0,0 +1 @@ +46 * * * * rsync-update.sh >> /var/log/rsync-update.log 2>&1 diff --git a/mirror/nginx.conf b/mirror/nginx.conf new file mode 100644 index 0000000..c7a40c6 --- /dev/null +++ b/mirror/nginx.conf @@ -0,0 +1,20 @@ +user www; + +worker_processes 4; + +events { + worker_connections 64; +} + +http { + server { + listen 80; + server_name exemple.com; + + root /srv/mirror; + location / { + autoindex on; + autoindex_exact_size off; + } + } +} diff --git a/mirror/rsync-update.sh b/mirror/rsync-update.sh new file mode 100644 index 0000000..a492a61 --- /dev/null +++ b/mirror/rsync-update.sh @@ -0,0 +1,67 @@ +#!/bin/bash + +# Directory where the repo is stored locally. Example: /srv/repo +target="/srv/mirror/archlinux" + +# Lockfile path +lock="/var/lock/syncrepo.lck" + +# Use 0 to disable the limit. +# The default unit is KiB (see man rsync /--bwlimit for more) +bwlimit=0 + +# The source URL of the mirror you want to sync from. +# Chose a tier 1 mirror from this list and use its rsync URL: +# https://www.archlinux.org/mirrors/ +source_url='rsync://mirror.theo546.fr/archlinux/' + +# An HTTP(S) URL pointing to the 'lastupdate' file on your chosen mirror. +# Use the HTTP(S) URL from your chosen mirror. +lastupdate_url='https://mirror.theo546.fr/archlinux/lastupdate' + +exec 9>"${lock}" +flock -n 9 || exit + +rsync_cmd() { + local -a cmd=(rsync -rlptH --safe-links --delete-delay --delay-updates + "--timeout=600" "--contimeout=60" --no-motd) + + if stty &>/dev/null; then + cmd+=(-h -v --progress) + else + cmd+=(--quiet) + fi + + if ((bwlimit > 0)); then + cmd+=("--bwlimit=$bwlimit") + fi + + "${cmd[@]}" "$@" +} + +# if we are called without a tty (cronjob) only run when there are changes +if ! tty -s && [[ -f "$target/lastupdate" ]] && diff -b <(curl -Ls "$lastupdate_url") "$target/lastupdate" >/dev/null; then + # keep lastsync file in sync for statistics generated by the Arch Linux website + rsync_cmd "$source_url/lastsync" "$target/lastsync" + exit 0 +fi + +rsync_cmd \ + --exclude='*.links.tar.gz*' \ + --exclude='/sources' \ + --exclude='/archive' \ + --exclude='/*-debug' \ + --exclude='/*-staging' \ + --exclude='/*-testing' \ + --exclude='/pool/*-debug' \ + --exclude='/images' \ + --exclude='/community' \ + --exclude='/gnome-unstable' \ + --exclude='/kde-unstable' \ + --exclude='/testing' \ + --exclude='/staging' \ + --exclude='/other' \ + "${source_url}" \ + "${target}" + +echo "Last sync was $(date -d @$(cat ${target}/lastsync))" diff --git a/nginx-proxy-manager/compose.yaml b/nginx-proxy-manager/compose.yaml new file mode 100644 index 0000000..6578c08 --- /dev/null +++ b/nginx-proxy-manager/compose.yaml @@ -0,0 +1,27 @@ +services: + app: + image: 'jc21/nginx-proxy-manager:latest' + restart: always + ports: + - '80:80' + - '81:81' + - '443:443' + environment: + DB_MYSQL_HOST: "db" + DB_MYSQL_PORT: 3306 + DB_MYSQL_USER: "user" + DB_MYSQL_PASSWORD: "passwd" + DB_MYSQL_NAME: "mysql" + volumes: + - ./data:/data + - ./letsencrypt:/etc/letsencrypt + db: + image: 'jc21/mariadb-aria:latest' + restart: always + environment: + MYSQL_ROOT_PASSWORD: 'root_passwd' + MYSQL_DATABASE: 'mysql' + MYSQL_USER: 'user' + MYSQL_PASSWORD: 'passwd' + volumes: + - ./mysql:/var/lib/mysql diff --git a/pihole/install.sh b/pihole/install.sh new file mode 100644 index 0000000..f7019d4 --- /dev/null +++ b/pihole/install.sh @@ -0,0 +1 @@ +curl -sSL https://install.pi-hole.net | bash diff --git a/pingvin-share/compose.yaml b/pingvin-share/compose.yaml new file mode 100644 index 0000000..716ebe6 --- /dev/null +++ b/pingvin-share/compose.yaml @@ -0,0 +1,11 @@ +services: + pingvin-share: + image: stonith404/pingvin-share + restart: always + ports: + - 80:3000 + environment: + - TRUST_PROXY=true + volumes: + - "./data:/opt/app/backend/data" + - "./images:/opt/app/frontend/public/img" diff --git a/qbittorrent/install.sh b/qbittorrent/install.sh new file mode 100644 index 0000000..2d06ef9 --- /dev/null +++ b/qbittorrent/install.sh @@ -0,0 +1,3 @@ +pacman -S qBittorrent-nox +systemctl enable qBittorrent-nox +systemctl start qBittorrent-nox diff --git a/uptime-kuma/compose.yaml b/uptime-kuma/compose.yaml new file mode 100644 index 0000000..429ef84 --- /dev/null +++ b/uptime-kuma/compose.yaml @@ -0,0 +1,9 @@ +services: + kuma: + image: 'louislam/uptime-kuma:1' + container_name: uptime-kuma + volumes: + - ./data:/app/data + ports: + - 80:3001 + restart: always diff --git a/vaultwarden/compose.yaml b/vaultwarden/compose.yaml new file mode 100644 index 0000000..ac240a9 --- /dev/null +++ b/vaultwarden/compose.yaml @@ -0,0 +1,21 @@ +services: + vaultwarden: + image: vaultwarden/server:latest + container_name: vaultwarden + restart: always + environment: + TZ: "Europe/Paris" + ADMIN_TOKEN: "ADMIN_TOKEN" + DOMAIN: "https://example.com" + SIGNUPS_ALLOWED: "false" + WEBSOCKET_ENABLED: "true" + SMTP_HOST: "mail.example.com" + SMTP_FROM: "no-reply@example.com" + SMTP_PORT: "465" + SMTP_SECURITY: "force_tls" + SMTP_USERNAME: "no-reply@example.com" + SMTP_PASSWORD: "passwd" + volumes: + - ./data/:/data/ + ports: + - 80:80