#!/usr/bin/env bash # Copyright (c) 2021-2026 community-scripts ORG # Author: luismco # License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE # Source: https://github.com/technomancer702/nodecast-tv source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" color verb_ip6 catch_errors setting_up_container network_check update_os fetch_and_deploy_gh_release "flatnotes" "dullage/flatnotes" USE_UVX=YES setup_uv setup_nodejs msg_info "Installing Backend" cd /opt/flatnotes $STD /usr/local/bin/uvx migrate-to-uv $STD /usr/local/bin/uv sync mkdir data msg_ok "Installed Backend" msg_info "Installing Frontend" cd /opt/flatnotes/client $STD npm install $STD npm run build msg_ok "Installed Frontend" msg_info "Configuring Variables" cat </opt/flatnotes/.env FLATNOTES_AUTH_TYPE='none' FLATNOTES_PATH='/opt/flatnotes/data/' #FLATNOTES_USERNAME='username' #FLATNOTES_PASSWORD='password' #FLATNOTES_SECRET_KEY='secret-key' EOF msg_ok "Configured Variables" msg_info "Creating Service" cat </etc/systemd/system/flatnotes.service [Unit] Description=Flatnotes After=network.target [Service] Type=simple WorkingDirectory=/opt/flatnotes EnvironmentFile=/opt/flatnotes/.env ExecStart=/opt/flatnotes/.venv/bin/python -m uvicorn main:app --app-dir server --host 0.0.0.0 --port 8080 --proxy-headers Restart=on-failure RestartSec=10 ExecStopPost=/bin/bash -c "rm -f /opt/flatnotes/uv.lock 2>/dev/null || true" [Install] WantedBy=multi-user.target EOF systemctl enable -q --now flatnotes msg_ok "Created Service" motd_ssh customize cleanup_lxc