Commit Graph

19 Commits

Author SHA1 Message Date
CanbiZ (MickLesk)
4ac7d3b34b fix(tubearchivist): use Docker-compatible paths for cache/media
TubeArchivist uses TA_CACHE_DIR and TA_MEDIA_DIR directly as URL paths.
In Docker these are /cache and /youtube, matching nginx locations.
Our paths (/opt/tubearchivist/cache, /opt/tubearchivist/media) broke
video playback URLs and file downloads.

Create symlinks /cache and /youtube pointing to data dirs, set env vars
to match Docker defaults. Aligns nginx alias paths with official config.
2026-03-30 13:38:46 +02:00
CanbiZ (MickLesk)
8fc2dc2427 fix(tubearchivist): fix nginx auth_request for cache/media files
The auth_request subrequest to /api/ping/ through the generic /api
location block doesn't properly forward cookies to the Django backend,
causing 403 for all /cache/ and /media/ requests.

Use a dedicated internal /_auth location that explicitly proxies to
/api/ping/ with Cookie header forwarding.
2026-03-30 13:32:36 +02:00
CanbiZ (MickLesk)
32ab032797 fix(tubearchivist): fix celery beat race condition on first boot
Beat service starts before manage.py migrate creates the
django_celery_beat tables, causing 'no such table' error.
Add ExecStartPre that waits for migration to complete by
polling the SQLite DB for the crontab table.
2026-03-30 13:12:38 +02:00
CanbiZ (MickLesk)
96fbb51abe fix(tubearchivist): correct TA_APP_DIR to backend path
Docker copies backend to /app, so APP_DIR=/app maps static/img/ correctly.
Our bare-metal install has backend at /opt/tubearchivist/backend/,
so TA_APP_DIR must point there for fallback thumbnails to resolve.

Fixes missing thumbnails, default-channel-banner.jpg not found error.
Update script migrates existing installs to the corrected path.
2026-03-30 11:56:22 +02:00
CanbiZ (MickLesk)
2b98ea03e9 node24 2026-03-26 07:57:35 +01:00
CanbiZ (MickLesk)
864761104c fix(tubearchivist): restart nginx after writing config
Debian auto-starts nginx on install with default config (port 80).
'enable --now' is a no-op if already running. Use explicit restart
to pick up our port 8000 config.
2026-03-25 17:08:56 +01:00
CanbiZ (MickLesk)
6983456e68 fix(tubearchivist): add ES_SNAPSHOT_DIR to .env
ES snapshot repo defaults to Docker path /usr/share/elasticsearch/data/snapshot
but our elasticsearch.yml uses path.repo: /var/lib/elasticsearch/snapshot.
Add ES_SNAPSHOT_DIR=/var/lib/elasticsearch/snapshot to match.
2026-03-25 17:05:16 +01:00
CanbiZ (MickLesk)
df6fabdbc4 fix(tubearchivist): source .env in run.sh + symlink for dotenv
run.sh needs env vars (TA_CACHE_DIR etc) before Django starts.
- Add set -a/source .env in run.sh so vars are available
- Symlink .env to backend/ so Django's load_dotenv('.env') finds it
- Fixes 'unable to open database file' (CACHE_DIR defaulting to /cache)
2026-03-25 17:02:45 +01:00
CanbiZ (MickLesk)
3bce8dd3f8 fix(tubearchivist): use startup wrapper script like Docker
Move Django management commands (migrate, collectstatic, ta_envcheck,
ta_connection, ta_startup) into run.sh startup wrapper that:
- Waits up to 60s for ElasticSearch to be healthy
- Runs all init commands before starting uvicorn
- Matches Docker's run.sh approach

This fixes ta_startup failing during install because ES wasn't ready.
The commands now run at every service start with ES readiness check.
2026-03-25 16:43:07 +01:00
CanbiZ (MickLesk)
462c95ee19 fix(tubearchivist): add nginx reverse proxy + celery services
TubeArchivist requires nginx to serve the frontend SPA and proxy API
requests to Django. Without nginx, only API routes work.

Changes:
- Add nginx with config matching Docker's nginx.conf (port 8000)
- Add TA_APP_DIR, TA_CACHE_DIR, TA_MEDIA_DIR env vars for bare-metal paths
- Run Django migrate, collectstatic, ta_envcheck, ta_connection, ta_startup
- Add celery worker + beat scheduler as separate systemd services
- Fix interface port from 8080 to 8000 (nginx)
- Add migrations step to update script
2026-03-25 16:30:36 +01:00
CanbiZ (MickLesk)
617b4443f9 fix(tubearchivist): correct port to 8080
backend_start.py reads TA_BACKEND_PORT (default 8080), not TA_PORT.
Fix .env var name and all port references from 8000 to 8080.
2026-03-25 16:19:04 +01:00
CanbiZ (MickLesk)
c5e5a938c7 feat: add .creds files for erpnext, teable, tubearchivist, storyteller
Write credentials to ~/appname.creds matching existing convention
(affine, discourse, ente). Update CT scripts to reference .creds.

- erpnext: admin pass, db root pass
- teable: db pass, secret key
- tubearchivist: admin pass, ES pass
- storyteller: secret key
2026-03-25 16:07:52 +01:00
CanbiZ (MickLesk)
83a2a4c37e fix(storyteller): use Node.js 24 as recommended by upstream docs
- Upstream requires Node 24.x - fixes SyntaxError in worker.cjs
- Add sqlite3 CLI tool as recommended dependency
2026-03-25 15:03:28 +01:00
CanbiZ (MickLesk)
f5a72358f3 fix(tubearchivist): remove nginx, backend listens directly on 8000
- Remove nginx reverse proxy (caused 502 because backend didn't start)
- TA_PORT=8000 so Django serves directly on port 8000
2026-03-25 12:15:16 +01:00
CanbiZ (MickLesk)
1f94843c9c fix: tubearchivist port conflict, jitsi flat repo, erpnext root env
- tubearchivist: backend on 8100 behind nginx on 8000 (was both 8000)
- jitsi: URI=download.jitsi.org suite=stable/ component=empty for flat repo
- erpnext: use CI=1 and FRAPPE_ALLOW_SUPERUSER=1 (not BENCH_ALLOW_SUPERUSER)
2026-03-25 12:08:20 +01:00
CanbiZ (MickLesk)
01e5884ae4 fix: erpnext bench root, jitsi repo URL, tubearchivist python3-dev, storyteller deps
- erpnext: add BENCH_ALLOW_SUPERUSER=1 for root execution
- jitsi: fix double stable/stable/ in repo URL
- tubearchivist: add python3-dev for python-ldap C extension build
- storyteller: add python3-setuptools and pkg-config for sqlite3 build
2026-03-25 11:47:22 +01:00
CanbiZ (MickLesk)
85d41e542d Update install scripts for storybook, readium, ES
Small fixes and improvements to installer scripts:

- storybook-install.sh: make npx non-interactive (add -y) and cd into the detected project path before writing .projectpath to ensure generated files land in the project directory.
- storyteller-install.sh: replace manual Readium curl/chmod flow with fetch_and_deploy_gh_release helper for consistent deployment; keep symlink to /usr/local/bin/readium.
- tubearchivist-install.sh: set ES_JAVA_OPTS during elasticsearch install to limit heap (-Xms1g -Xmx1g) and explicitly disable xpack transport/http SSL in the config to avoid local SSL requirements.

These changes improve automation reliability and resource/config defaults during automated installs.
2026-03-25 11:18:47 +01:00
CanbiZ (MickLesk)
65a9b046c2 ffmpeg 2026-03-25 10:59:03 +01:00
CanbiZ (MickLesk)
9d21dfa112 Add CT installers and metadata for six apps
Add container templates, install scripts and metadata for six applications: BirdNET-Go, ERPNext, Jitsi Meet, Storybook, Storyteller and Tube Archivist. New files include ct/* scripts (container templates and update handlers), install/* scripts (installation and systemd service setup, dependency installation and build steps) and json/* metadata entries (app catalog data, default resources, ports and notes). Each install script configures required dependencies, creates services, and prepares runtime configuration (e.g. DB, ElasticSearch, Node/Python environments, ffmpeg/Readium). This commit enables automated LXC provisioning and update flows for these apps.
2026-03-25 10:21:42 +01:00