Centralize demo config in .env and add bootstrap-stack.sh

Expand .env.example with ports, AI, Usenet, WireGuard, demo logins, and
bootstrap flags. One script creates dirs, downloads the model, starts
compose, heals gluetun, and configures SABnzbd from the same file.
This commit is contained in:
tim 2026-07-22 13:06:08 -07:00
parent 56ddb349b4
commit 3bf1726a99
7 changed files with 410 additions and 76 deletions

View file

@ -1,17 +1,54 @@
# Generated by Ansible for {{ inventory_hostname }} — do not commit
# Host: {{ ansible_host | default(inventory_hostname) }}
# Tech demo: DEMO_USER/DEMO_PASS used across local UIs when you set them.
################################################################################
# Demo login (local services)
################################################################################
DEMO_MODE=true
DEMO_USER={{ demo_user | default('tim') }}
DEMO_PASS={{ demo_pass | default('asdfasdf') }}
OPENAI_API_KEY={{ openai_api_key | default('sk-local-bonsai') }}
################################################################################
# Host
################################################################################
PUID={{ ansible_user_uid | default(1000) }}
PGID={{ ansible_user_gid | default(1000) }}
TZ={{ timezone }}
CONFIG_DIR={{ config_dir }}
DATA_DIR={{ data_dir }}
LAN_SUBNET={{ lan_subnet }}
STACK_HOST={{ forgejo_domain }}
# --- AI (Ternary-Bonsai + Vulkan on SER5) ---
################################################################################
# Ports
################################################################################
LANDING_PORT=80
SABNZBD_PORT=8085
OPEN_WEBUI_PORT=3000
BONSAI_PORT=8081
OPENHANDS_PORT=3001
FORGEJO_HTTP_PORT={{ forgejo_http_port }}
FORGEJO_SSH_PORT={{ forgejo_ssh_port }}
SEARXNG_PORT=8888
################################################################################
# WireGuard
################################################################################
WIREGUARD_ENDPOINT_HOST={{ wireguard_endpoint_host | default('las-183-wg.whiskergalaxy.com') }}
WIREGUARD_ENDPOINT_PORT={{ wireguard_endpoint_port | default('443') }}
################################################################################
# AI
################################################################################
BONSAI_MODELS_DIR={{ models_dir }}
BONSAI_MODEL_PATH=/models/Ternary-Bonsai-27B-Q2_0.gguf
BONSAI_HF_REPO=prism-ml/Ternary-Bonsai-27B-gguf
BONSAI_MAIN_FILE=Ternary-Bonsai-27B-Q2_0.gguf
DOWNLOAD_MODEL=true
DOWNLOAD_VISION=true
DOWNLOAD_DRAFTER=false
BONSAI_BACKEND={{ bonsai_backend }}
BONSAI_NGL={{ bonsai_ngl }}
BONSAI_CTX={{ bonsai_ctx }}
@ -20,26 +57,48 @@ BONSAI_THREADS={{ bonsai_threads }}
BONSAI_TEMP=0.7
BONSAI_TOP_P=0.95
BONSAI_TOP_K=20
BONSAI_PORT=8081
OPEN_WEBUI_PORT=3000
OPENAI_API_KEY=sk-local-bonsai
BONSAI_EXTRA_ARGS=
WEBUI_AUTH={{ open_webui_auth }}
OPENWEBUI_DEFAULT_MODEL=openai/Ternary-Bonsai-27B-Q2_0.gguf
AI_WORKSPACE_DIR={{ workspace_dir }}
SEARXNG_PORT=8888
SEARXNG_SECRET={{ lookup('password', playbook_dir + '/.secrets/searxng_secret chars=ascii_letters,digits length=48') }}
OPENHANDS_MODEL=openai/Ternary-Bonsai-27B-Q2_0.gguf
START_OPENHANDS=false
OPENHANDS_PORT=3001
OPENHANDS_MODEL=openai/local
# Forgejo (self-hosted Git)
FORGEJO_HTTP_PORT={{ forgejo_http_port }}
FORGEJO_SSH_PORT={{ forgejo_ssh_port }}
################################################################################
# Forgejo
################################################################################
FORGEJO_DOMAIN={{ forgejo_domain }}
FORGEJO_ROOT_URL={{ forgejo_root_url }}
FORGEJO_DISABLE_REGISTRATION=false
FORGEJO_ADMIN_USER={{ demo_user | default('tim') }}
FORGEJO_ADMIN_PASS={{ demo_pass | default('asdfasdf') }}
FORGEJO_ADMIN_EMAIL=tim@stack.local
STACK_GIT_REPO={{ stack_git_repo }}
STACK_GIT_BRANCH={{ stack_git_branch }}
# WireGuard peer hostname for gluetun-endpoint-watch (re-dig when tunnel dies)
WIREGUARD_ENDPOINT_HOST={{ wireguard_endpoint_host | default('las-183-wg.whiskergalaxy.com') }}
WIREGUARD_ENDPOINT_PORT={{ wireguard_endpoint_port | default('443') }}
################################################################################
# Usenet — fill from secrets or set here for demo
################################################################################
NZBGEEKAPI=https://api.nzbgeek.info/
NZBKEEPKEY=
NEWSHOSTINGAPI=news.newshosting.com
NEWSHOSTINGSSLPORT=563
NEWSHOSTINGUSER=
HNEWSHOSTINGPASS=
NEWSHOSTINGCONNECTIONS=20
TWEAKNEWSAPI=news.tweaknews.eu
TWEAKNEWSSSLPORT=563
TWEAKNEWSLOGIN=
TWEAKNEWSPASSWORD=
TWEAKNEWSCONNECTIONS=40
################################################################################
# Misc
################################################################################
FLARESOLVERR_LOG_LEVEL=info
FLARESOLVERR_CAPTCHA_SOLVER=none
CONFIGURE_USENET=true
HEAL_GLUETUN=true
COMPOSE_PULL=true
COMPOSE_PROFILES=