feat: add Transmute, DrawDB, and Nametag CT scripts
Transmute: Self-hosted file converter (Python 3.13/FastAPI + Node.js 20) - 100+ formats: images, video, audio, docs, spreadsheets, fonts - ffmpeg, ghostscript, inkscape, tesseract, libreoffice, pandoc, calibre - Port 3313, SQLite, Xvfb for headless rendering DrawDB: Database schema editor (pure SPA, Node.js 20 + Caddy) - Tags-only repo: uses fetch_and_deploy_gh_tag/check_for_gh_tag - Port 3000, no backend, no database Nametag: Personal relationships manager (Next.js standalone + PostgreSQL) - Prisma ORM, photo storage, cron jobs for reminders/purge - Port 3000, auto-verified accounts for self-hosted
This commit is contained in:
42
install/drawdb-install.sh
Normal file
42
install/drawdb-install.sh
Normal file
@@ -0,0 +1,42 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright (c) 2021-2026 community-scripts ORG
|
||||
# Author: MickLesk
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE
|
||||
# Source: https://github.com/drawdb-io/drawdb
|
||||
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
||||
msg_info "Installing Dependencies"
|
||||
$STD apt install -y caddy
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
NODE_VERSION="20" setup_nodejs
|
||||
fetch_and_deploy_gh_tag "drawdb" "drawdb-io/drawdb" "latest" "/opt/drawdb"
|
||||
|
||||
msg_info "Building Frontend"
|
||||
cd /opt/drawdb
|
||||
$STD npm ci
|
||||
NODE_OPTIONS="--max-old-space-size=4096" $STD npm run build
|
||||
msg_ok "Built Frontend"
|
||||
|
||||
msg_info "Configuring Caddy"
|
||||
cat <<EOF >/etc/caddy/Caddyfile
|
||||
:3000 {
|
||||
root * /opt/drawdb/dist
|
||||
file_server
|
||||
try_files {path} /index.html
|
||||
}
|
||||
EOF
|
||||
systemctl reload caddy
|
||||
msg_ok "Configured Caddy"
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
cleanup_lxc
|
||||
86
install/nametag-install.sh
Normal file
86
install/nametag-install.sh
Normal file
@@ -0,0 +1,86 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright (c) 2021-2026 community-scripts ORG
|
||||
# Author: MickLesk
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE
|
||||
# Source: https://github.com/mattogodoy/nametag
|
||||
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
||||
PG_VERSION="16" setup_postgresql
|
||||
PG_DB_NAME="nametag_db" PG_DB_USER="nametag" setup_postgresql_db
|
||||
NODE_VERSION="20" setup_nodejs
|
||||
fetch_and_deploy_gh_release "nametag" "mattogodoy/nametag" "tarball" "latest" "/opt/nametag"
|
||||
|
||||
msg_info "Setting up Application"
|
||||
cd /opt/nametag
|
||||
$STD npm ci
|
||||
$STD npx prisma generate
|
||||
DATABASE_URL="postgresql://${PG_DB_USER}:${PG_DB_PASS}@127.0.0.1:5432/${PG_DB_NAME}" $STD npx prisma migrate deploy
|
||||
msg_ok "Set up Application"
|
||||
|
||||
msg_info "Configuring Nametag"
|
||||
NEXTAUTH_SECRET=$(openssl rand -base64 32)
|
||||
CRON_SECRET=$(openssl rand -base64 16)
|
||||
mkdir -p /opt/nametag/data/photos
|
||||
cat <<EOF >/opt/nametag/.env
|
||||
DATABASE_URL=postgresql://${PG_DB_USER}:${PG_DB_PASS}@127.0.0.1:5432/${PG_DB_NAME}
|
||||
NEXTAUTH_URL=http://${LOCAL_IP}:3000
|
||||
NEXTAUTH_SECRET=${NEXTAUTH_SECRET}
|
||||
CRON_SECRET=${CRON_SECRET}
|
||||
PHOTO_STORAGE_PATH=/opt/nametag/data/photos
|
||||
NODE_ENV=production
|
||||
EOF
|
||||
msg_ok "Configured Nametag"
|
||||
|
||||
msg_info "Building Application"
|
||||
cd /opt/nametag
|
||||
set -a
|
||||
source /opt/nametag/.env
|
||||
set +a
|
||||
$STD npm run build
|
||||
msg_ok "Built Application"
|
||||
|
||||
msg_info "Running Production Seed"
|
||||
cd /opt/nametag
|
||||
$STD npx esbuild prisma/seed.production.ts --platform=node --format=cjs --outfile=prisma/seed.production.js --bundle --external:@prisma/client --external:pg --minify
|
||||
$STD node prisma/seed.production.js
|
||||
msg_ok "Ran Production Seed"
|
||||
|
||||
msg_info "Creating Service"
|
||||
cat <<EOF >/etc/systemd/system/nametag.service
|
||||
[Unit]
|
||||
Description=Nametag - Personal Relationships Manager
|
||||
After=network.target postgresql.service
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
WorkingDirectory=/opt/nametag
|
||||
EnvironmentFile=/opt/nametag/.env
|
||||
ExecStart=/usr/bin/node /opt/nametag/.next/standalone/server.js
|
||||
Restart=on-failure
|
||||
RestartSec=5
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
systemctl enable -q --now nametag
|
||||
msg_ok "Created Service"
|
||||
|
||||
msg_info "Setting up Cron Jobs"
|
||||
cat <<EOF >/etc/cron.d/nametag
|
||||
0 8 * * * root curl -sf -H "Authorization: Bearer ${CRON_SECRET}" http://127.0.0.1:3000/api/cron/send-reminders >/dev/null 2>&1
|
||||
0 3 * * * root curl -sf -H "Authorization: Bearer ${CRON_SECRET}" http://127.0.0.1:3000/api/cron/purge-deleted >/dev/null 2>&1
|
||||
EOF
|
||||
chmod 644 /etc/cron.d/nametag
|
||||
msg_ok "Set up Cron Jobs"
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
cleanup_lxc
|
||||
110
install/transmute-install.sh
Normal file
110
install/transmute-install.sh
Normal file
@@ -0,0 +1,110 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright (c) 2021-2026 community-scripts ORG
|
||||
# Author: MickLesk
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE
|
||||
# Source: https://github.com/transmute-app/transmute
|
||||
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
||||
msg_info "Installing Dependencies"
|
||||
$STD apt install -y \
|
||||
inkscape \
|
||||
tesseract-ocr \
|
||||
libreoffice-impress \
|
||||
libreoffice-common \
|
||||
libmagic1 \
|
||||
xvfb \
|
||||
libpango-1.0-0 \
|
||||
libpangocairo-1.0-0 \
|
||||
libgdk-pixbuf-2.0-0 \
|
||||
libffi-dev \
|
||||
libcairo2 \
|
||||
librsvg2-bin \
|
||||
unar \
|
||||
python3-numpy \
|
||||
python3-lxml \
|
||||
python3-tinycss2 \
|
||||
python3-cssselect
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
UV_PYTHON="3.13" setup_uv
|
||||
NODE_VERSION="20" setup_nodejs
|
||||
setup_ffmpeg
|
||||
setup_gs
|
||||
|
||||
msg_info "Installing Pandoc"
|
||||
PANDOC_VERSION=$(get_latest_github_release "jgm/pandoc")
|
||||
curl -fsSL "https://github.com/jgm/pandoc/releases/download/${PANDOC_VERSION}/pandoc-${PANDOC_VERSION#v}-linux-amd64.tar.gz" -o /tmp/pandoc.tar.gz
|
||||
tar -xzf /tmp/pandoc.tar.gz -C /tmp
|
||||
cp /tmp/pandoc-*/bin/pandoc /usr/local/bin/pandoc
|
||||
chmod +x /usr/local/bin/pandoc
|
||||
rm -rf /tmp/pandoc*
|
||||
msg_ok "Installed Pandoc"
|
||||
|
||||
msg_info "Installing Calibre"
|
||||
CALIBRE_VERSION=$(get_latest_github_release "kovidgoyal/calibre")
|
||||
curl -fsSL "https://github.com/kovidgoyal/calibre/releases/download/${CALIBRE_VERSION}/calibre-${CALIBRE_VERSION#v}-x86_64.txz" -o /tmp/calibre.txz
|
||||
mkdir -p /opt/calibre
|
||||
tar -xJf /tmp/calibre.txz -C /opt/calibre
|
||||
ln -sf /opt/calibre/ebook-convert /usr/bin/ebook-convert
|
||||
rm -f /tmp/calibre.txz
|
||||
msg_ok "Installed Calibre"
|
||||
|
||||
fetch_and_deploy_gh_release "transmute" "transmute-app/transmute" "tarball" "latest" "/opt/transmute"
|
||||
|
||||
msg_info "Setting up Python Backend"
|
||||
cd /opt/transmute
|
||||
$STD uv venv /opt/transmute/.venv
|
||||
$STD uv pip install --python /opt/transmute/.venv/bin/python -r requirements.txt
|
||||
msg_ok "Set up Python Backend"
|
||||
|
||||
msg_info "Configuring Transmute"
|
||||
SECRET_KEY=$(openssl rand -hex 64)
|
||||
cat <<EOF >/opt/transmute/backend/.env
|
||||
AUTH_SECRET_KEY=${SECRET_KEY}
|
||||
HOST=0.0.0.0
|
||||
PORT=3313
|
||||
DATA_DIR=/opt/transmute/data
|
||||
WEB_DIR=/opt/transmute/frontend/dist
|
||||
EOF
|
||||
mkdir -p /opt/transmute/data
|
||||
msg_ok "Configured Transmute"
|
||||
|
||||
msg_info "Building Frontend"
|
||||
cd /opt/transmute/frontend
|
||||
$STD npm ci
|
||||
$STD npm run build
|
||||
msg_ok "Built Frontend"
|
||||
|
||||
msg_info "Creating Service"
|
||||
cat <<EOF >/etc/systemd/system/transmute.service
|
||||
[Unit]
|
||||
Description=Transmute File Converter
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
WorkingDirectory=/opt/transmute
|
||||
EnvironmentFile=/opt/transmute/backend/.env
|
||||
Environment=DISPLAY=:99
|
||||
ExecStartPre=/usr/bin/Xvfb :99 -screen 0 1024x768x24 -nolisten tcp
|
||||
ExecStart=/opt/transmute/.venv/bin/python backend/main.py
|
||||
Restart=on-failure
|
||||
RestartSec=5
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
systemctl enable -q --now transmute
|
||||
msg_ok "Created Service"
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
cleanup_lxc
|
||||
Reference in New Issue
Block a user