Files
mates-infra/install-scripts/README.md
T
mates 444191d16d feat: initial infra repo
- docker-services: 14 generic compose templates (portainer, npm, vaultwarden, gitea, jotty, nextcloud-aio, rustdesk, audiobookshelf, calibre-web, plex, erugo, jswiki, speedtest, watchtower)
- install-scripts: bash scripts for Ubuntu server bootstrap, docker, portainer, npm, backup, restore
- ansible: 4 playbooks (bootstrap, deploy-services, update-services, security-hardening) + roles skeleton
- hermes-install: Hermes CLI setup on macOS
- macos-setup: Brewfile + osx-defaults + fish-config
- home-nas-tools: metadata index for NAS projects (no binaries)
- docs: architecture, security, contributing
- README, LICENSE (MIT), .gitignore
2026-08-01 16:25:58 +02:00

67 lines
1.9 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 📥 Install Scripts
> Bash skripty pro nasazení nového Ubuntu serveru (22.04 / 24.04 LTS).
> Idempotentní, s `--help` a dry-run.
## 📚 Skripty
| Skript | Účel |
|---|---|
| [`bootstrap-ubuntu-server.sh`](bootstrap-ubuntu-server.sh) | Úvodní setup: aktualizace, uživatel, SSH, firewall, fail2ban |
| [`install-docker.sh`](install-docker.sh) | Docker + Docker Compose plugin |
| [`install-portainer.sh`](install-portainer.sh) | Portainer CE |
| [`install-nginx-proxy.sh`](install-nginx-proxy.sh) | Nginx Proxy Manager (s HTTPS) |
| [`backup-all.sh`](backup-all.sh) | Záloha všech Docker dat na NAS |
| [`restore-all.sh`](restore-all.sh) | Obnova z NAS zálohy |
## 🚀 Quickstart (nový server)
```bash
# 1. Bootstrap (úvodní nastavení)
sudo bash bootstrap-ubuntu-server.sh
# 2. Docker
sudo bash install-docker.sh
# 3. Portainer
sudo bash install-portainer.sh
# 4. NPM (reverzní proxy)
sudo bash install-nginx-proxy.sh
# 5. Přidej služby
cd ~/docker-services/portainer
cp .env.example .env && nano .env
docker compose up -d
```
## ⚙️ Společné konvence
- Všechny skripty podporují `--help`
- `set -euo pipefail` (fail-fast)
- Idempotentní (můžeš spustit víckrát)
- Logy do `/var/log/<skript>.log`
- Barvy v terminále (ANSI), automaticky se vypnou v non-TTY
## 🔐 Bezpečnost
- **Nikdy nespouštěj skript, který nečteš** `less <skript>` předem
- **Všechny skripty chtějí root** kontrolují `$EUID`
- **Všechny skripty** podporují dry-run, kde to dává smysl
- **Bez hesel v skriptech** vše z `prompt` nebo `.env`
## 📁 Struktura
```
install-scripts/
├── README.md
├── bootstrap-ubuntu-server.sh
├── install-docker.sh
├── install-portainer.sh
├── install-nginx-proxy.sh
├── backup-all.sh
├── restore-all.sh
└── lib/ # Společné knihovny
└── common.sh
```