Delete flatnotes (ct) after migration to ProxmoxVE (#1297)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
parent
31c4d60e70
commit
3cb4248486
@ -1,79 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func)
|
|
||||||
# Copyright (c) 2021-2026 community-scripts ORG
|
|
||||||
# Author: luismco
|
|
||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE
|
|
||||||
# Source: https://github.com/dullage/flatnotes
|
|
||||||
|
|
||||||
APP="Flatnotes"
|
|
||||||
var_tags="${var_tags:-notes}"
|
|
||||||
var_cpu="${var_cpu:-1}"
|
|
||||||
var_ram="${var_ram:-1024}"
|
|
||||||
var_disk="${var_disk:-4}"
|
|
||||||
var_os="${var_os:-debian}"
|
|
||||||
var_version="${var_version:-13}"
|
|
||||||
var_unprivileged="${var_unprivileged:-1}"
|
|
||||||
|
|
||||||
header_info "$APP"
|
|
||||||
variables
|
|
||||||
color
|
|
||||||
catch_errors
|
|
||||||
|
|
||||||
function update_script() {
|
|
||||||
header_info
|
|
||||||
check_container_storage
|
|
||||||
check_container_resources
|
|
||||||
if [[ ! -d /opt/flatnotes ]]; then
|
|
||||||
msg_error "No ${APP} Installation Found!"
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
|
|
||||||
if check_for_gh_release "flatnotes" "dullage/flatnotes"; then
|
|
||||||
msg_info "Stopping Service"
|
|
||||||
systemctl stop flatnotes
|
|
||||||
msg_ok "Stopped Service"
|
|
||||||
|
|
||||||
msg_info "Backing up Configuration and Data"
|
|
||||||
cp /opt/flatnotes/.env /opt/flatnotes.env
|
|
||||||
cp -r /opt/flatnotes/data /opt/flatnotes_data_backup
|
|
||||||
msg_ok "Backed up Configuration and Data"
|
|
||||||
|
|
||||||
fetch_and_deploy_gh_release "flatnotes" "dullage/flatnotes"
|
|
||||||
|
|
||||||
msg_info "Updating Frontend"
|
|
||||||
cd /opt/flatnotes/client
|
|
||||||
$STD npm install
|
|
||||||
$STD npm run build
|
|
||||||
msg_ok "Updated Frontend"
|
|
||||||
|
|
||||||
msg_info "Updating Backend"
|
|
||||||
cd /opt/flatnotes
|
|
||||||
rm -f uv.lock
|
|
||||||
$STD /usr/local/bin/uvx migrate-to-uv
|
|
||||||
$STD /usr/local/bin/uv sync
|
|
||||||
msg_ok "Updated Backend"
|
|
||||||
|
|
||||||
msg_info "Restoring Configuration and Data"
|
|
||||||
cp /opt/flatnotes.env /opt/flatnotes/.env
|
|
||||||
cp -r /opt/flatnotes_data_backup/. /opt/flatnotes/data
|
|
||||||
rm -f /opt/flatnotes.env
|
|
||||||
rm -r /opt/flatnotes_data_backup
|
|
||||||
msg_ok "Restored Configuration and Data"
|
|
||||||
|
|
||||||
msg_info "Starting Service"
|
|
||||||
systemctl start flatnotes
|
|
||||||
msg_ok "Started Service"
|
|
||||||
msg_ok "Updated successfully!"
|
|
||||||
fi
|
|
||||||
exit
|
|
||||||
}
|
|
||||||
|
|
||||||
start
|
|
||||||
build_container
|
|
||||||
description
|
|
||||||
|
|
||||||
msg_ok "Completed successfully!\n"
|
|
||||||
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
|
|
||||||
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
|
|
||||||
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:8080${CL}"
|
|
||||||
|
|
||||||
@ -1,35 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "Flatnotes",
|
|
||||||
"slug": "flatnotes",
|
|
||||||
"categories": [
|
|
||||||
12
|
|
||||||
],
|
|
||||||
"date_created": "2026-01-15",
|
|
||||||
"type": "ct",
|
|
||||||
"updateable": true,
|
|
||||||
"privileged": false,
|
|
||||||
"interface_port": 8080,
|
|
||||||
"documentation": "https://github.com/dullage/flatnotes/wiki",
|
|
||||||
"website": "https://github.com/dullage/flatnotes",
|
|
||||||
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons@main/webp/flatnotes.webp",
|
|
||||||
"config_path": "/opt/flatnotes/.env",
|
|
||||||
"description": "A self-hosted, database-less note-taking web app that utilises a flat folder of markdown files for storage.",
|
|
||||||
"install_methods": [
|
|
||||||
{
|
|
||||||
"type": "default",
|
|
||||||
"script": "ct/flatnotes.sh",
|
|
||||||
"resources": {
|
|
||||||
"cpu": 1,
|
|
||||||
"ram": 1024,
|
|
||||||
"hdd": 4,
|
|
||||||
"os": "debian",
|
|
||||||
"version": "13"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"default_credentials": {
|
|
||||||
"username": null,
|
|
||||||
"password": null
|
|
||||||
},
|
|
||||||
"notes": []
|
|
||||||
}
|
|
||||||
@ -1,63 +0,0 @@
|
|||||||
#!/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/dullage/flatnotes
|
|
||||||
|
|
||||||
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 /opt/flatnotes/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 "Creating Service"
|
|
||||||
cat <<EOF >/opt/flatnotes/.env
|
|
||||||
FLATNOTES_AUTH_TYPE='none'
|
|
||||||
FLATNOTES_PATH='/opt/flatnotes/data/'
|
|
||||||
#FLATNOTES_USERNAME='username'
|
|
||||||
#FLATNOTES_PASSWORD='password'
|
|
||||||
#FLATNOTES_SECRET_KEY='secret-key'
|
|
||||||
EOF
|
|
||||||
cat <<EOF >/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
|
|
||||||
|
|
||||||
[Install]
|
|
||||||
WantedBy=multi-user.target
|
|
||||||
EOF
|
|
||||||
systemctl enable -q --now flatnotes
|
|
||||||
msg_ok "Created Service"
|
|
||||||
|
|
||||||
motd_ssh
|
|
||||||
customize
|
|
||||||
cleanup_lxc
|
|
||||||
Loading…
x
Reference in New Issue
Block a user