From 282cc42856329fb25024eadf474b357877dae712 Mon Sep 17 00:00:00 2001 From: ReLoia Date: Mon, 13 Apr 2026 00:56:45 +0200 Subject: [PATCH] docs(readme): add quick production setup instructions chore(setup): auto-create .env from example if missing and open in editor --- README.md | 8 +++++++- setup.sh | 11 ++++++++++- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 6682ed5..dc60476 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,13 @@ icona di una presa della spina idk FastAPI + MongoDB + Redis ``` -### Setup Dev +## Quick Setup (prod) + +```bash +bash <(curl -s https://git.reloia.uk/reloia/thePlug/raw/branch/master/setup.sh) +``` + +## Setup Dev imposta le variabili d'ambiente diff --git a/setup.sh b/setup.sh index d034eb6..aa0f8ab 100644 --- a/setup.sh +++ b/setup.sh @@ -48,7 +48,16 @@ source .venv/bin/activate info "Syncing dependencies..." uv sync -# ── 6. run in tmux ──────────────────────────────────────────────────────────── +# 6 + +if [[ ! -f .env ]]; then + warn ".env not found — copyinh from .env.example..." + cp .env.example .env || die ".env.example not found (impossibile)" + info "Opening the editor on the .env file (non vedrai mai questo messaggio)..." + ${EDITOR:-nano} .env +fi + +# ── - E DOPO C'È IL 7 !!!!. run in tmux ──────────────────────────────────────────────────────────── SESSION="theplug" if tmux has-session -t "$SESSION" 2>/dev/null; then