1588 Commits

Author SHA1 Message Date
CanbiZ (MickLesk)
7f0ca0f9d0 Add Dockerfile and move ingest service
Containerize the telemetry ingest service and reorganize source layout. Added misc/data/Dockerfile with a multi-stage build (golang:1.23-alpine -> alpine:3.23) to produce /app/telemetry-ingest, run as a non-root user, expose :8080, and provide default env vars for configuration (LISTEN_ADDR, MAX_BODY_BYTES, RATE_LIMIT_RPM, RATE_BURST, RATE_KEY_MODE, ENABLE_REQUEST_LOGGING, UPSTREAM_TIMEOUT_MS). Renamed misc/ingest.go to misc/data/service.go to reflect the new directory structure.
2026-02-09 15:38:29 +01:00
CanbiZ (MickLesk)
0e16e3fd63 Update ingest.go 2026-02-09 15:34:22 +01:00
CanbiZ (MickLesk)
820d4551a1 Replace Go API with PocketBase; update docs
Remove the old Go/Mongo API (api/main.go, go.mod, go.sum, .env.example) and switch telemetry backend to PocketBase (http://db.community-scripts.org). Update documentation and flowcharts to reflect the PocketBase collection (_dev_telemetry_data), new REST endpoints (POST/PATCH/GET), field schema, and revised api.func integration (LXC/VM reporting and status updates). Misc scripts and helpers were adjusted (misc/api.func, misc/build.func, misc/error_handler.func) and a new misc/ingest.go was added. This consolidates telemetry to a hosted PocketBase instance and updates docs and integration points accordingly.
2026-02-09 15:34:17 +01:00
Finn Joshua Bartels
3232665b92 feat(core): dev mode configurator menu
- Implement interactive Whiptail checklist for dev_mode configuration
- Add logic to read and pre-populate menu from existing dev_mode enviorment var
2026-02-09 11:49:02 +01:00
CanbiZ (MickLesk)
0b20d464c5 port ssh keys from build.func into cloudinit 2026-02-04 11:21:33 +01:00
CanbiZ (MickLesk)
e7057f29d4 Add interactive SSH key selection for cloud-init
Make SSH key provisioning explicit and interactive for cloud-init VMs. Default CLOUDINIT_SSH_KEYS is now empty; new helper functions discover and extract public keys from common host files, count them, and present a whiptail menu (import all host keys, paste one key, specify a file, or none). configure_cloudinit_ssh_keys writes selected keys to a temp file and sets CLOUDINIT_SSH_KEYS accordingly (removing the temp file if empty). setup_cloud_init now only applies --sshkeys when CLOUDINIT_SSH_KEYS is explicitly provided and logs the source, and vm/docker-vm.sh invokes the key selection UI for cloud-init VMs.
2026-02-04 11:16:41 +01:00
CanbiZ (MickLesk)
cc10993edb Update vm-core.func 2026-02-03 14:27:09 +01:00
CanbiZ (MickLesk)
b9cbfef0ca Improve logging, error handling, and messages
Add new icons and message helpers; introduce get_active_logfile and enhance silent() to redirect output to a proper log file (BUILD_LOG or /tmp fallback), preserve/propagate exit codes, temporarily disable traps while running commands, source explain_exit_code for human-friendly error explanations, and show the last 10 log lines on failure. Also sanitize keys when unsetting MSG_INFO_SHOWN to avoid ANSI/control-char issues, add msg_warn and fatal helpers, and make msg_custom skip empty messages. These changes improve observability and robustness of VM creation scripts and error reporting.
2026-02-03 14:18:57 +01:00
CanbiZ (MickLesk)
49318cc629 remove ssh check 2026-02-03 14:11:38 +01:00
MickLesk
2e1ee2d853 feat(tools): add fetch_and_deploy_codeberg_release function
Some checks failed
Update GitHub Versions (New) / update-github-versions (push) Has been cancelled
Cleanup Branches (Merged or Closed) / cleanup (push) Has been cancelled
Update Versions from GitHub / update-versions (push) Has been cancelled
Add Codeberg equivalent of fetch_and_deploy_gh_release supporting:
- tarball/source mode for source code archives
- binary mode for .deb packages
- prebuild mode for prebuilt archives
- singlefile mode for standalone binaries
- tag mode for direct tag downloads

Uses Codeberg API and archive URL patterns:
- API: https://codeberg.org/api/v1/repos/{owner}/{repo}/releases
- Archive: https://codeberg.org/{owner}/{repo}/archive/{tag}.tar.gz
2026-02-01 20:35:40 +01:00
CanbiZ (MickLesk)
abb15a6ec8 devuan fixes 2026-01-30 10:21:55 +01:00
CanbiZ (MickLesk)
edac4a2293 Update install.func 2026-01-30 09:59:11 +01:00
CanbiZ (MickLesk)
dc5c1d3ef0 Improve locale setup and database user privileges
Add command to grant superuser, createrole, and createdb privileges to the postgres user during Databasus installation. Enhance LXC container customization by installing locales for Devuan templates and only configuring locale if locale.gen exists, improving compatibility with minimal templates.
2026-01-30 09:47:38 +01:00
Justin
62f68959c7 Remove inline comment in misc/tools.func
Co-authored-by: Michel Roegl-Brunner <73236783+michelroegl-brunner@users.noreply.github.com>
2026-01-29 10:24:13 +01:00
Justin
f2a847ac81 Remove inline comment in misc/alpine-tools.func
Co-authored-by: Michel Roegl-Brunner <73236783+michelroegl-brunner@users.noreply.github.com>
2026-01-29 10:24:13 +01:00
justin
75898f4986 Add tail -1 before tr to use only the last value 2026-01-29 10:24:13 +01:00
justin
622fda4b32 Fix download_with_progress() content_length calc 2026-01-29 10:24:13 +01:00
justin
54bbdc180a Remove inline comment in misc/alpine-tools.func 2026-01-29 10:23:17 +01:00
justin
f4495280cf AWK output needs to be sanitized 2026-01-29 10:23:17 +01:00
justin
16d0ffa19a $pattern doesn't need to be a parameter 2026-01-29 10:23:17 +01:00
justin
bf97037ba5 Remove bad quotes 2026-01-29 10:23:17 +01:00
justin
d7d16543e5 Fix url assignment in fetch_and_deploy_gh_release 2026-01-29 10:23:17 +01:00
justin
000a7a2701 Fix Error check and error message style 2026-01-29 10:21:41 +01:00
justin
8c4f1ce531 Make check_container_storage() POSIX compliant 2026-01-29 10:21:41 +01:00
CanbiZ (MickLesk)
36eaaea69b add TAG mode in tools.func fetch_and_deploy 2026-01-29 08:50:12 +01:00
CanbiZ (MickLesk)
293a5a8340 test 2026-01-28 14:59:32 +01:00
CanbiZ (MickLesk)
6965e3e2ec fix: use safe arithmetic to avoid exit code 1 from ((attempts++)) when attempts=0 2026-01-27 13:47:48 +01:00
CanbiZ (MickLesk)
a6134095d4 fix: correct if/fi nesting in template selection blocks 2026-01-27 13:45:38 +01:00
CanbiZ (MickLesk)
1bb32bbc94 fix syntax 2026-01-27 13:39:57 +01:00
CanbiZ (MickLesk)
a82d04982d Improve unattended mode detection and export MODE
Enhanced the is_unattended() function to prioritize the MODE variable for detecting unattended/non-interactive mode, with detailed handling for various modes and legacy fallbacks. Also, export MODE in build_container() to inform install scripts about the current mode. Updated APP name in forgejo-runner.sh for consistency.
2026-01-27 13:38:49 +01:00
CanbiZ (MickLesk)
310d0e54a6 Interactive Prompts 2026-01-27 13:26:31 +01:00
CanbiZ (MickLesk)
3b9ad58ce3 merge from Main 2026-01-27 10:08:34 +01:00
CanbiZ (MickLesk)
6f9a1965f9 Merge from VE 2026-01-27 09:29:22 +01:00
tremor021
972e1c1844 Add deb handling to fetch_and_deploy_archive 2026-01-23 13:50:18 +01:00
tremor021
7d5123bdd6 add fetch_and_deploy_archive 2026-01-22 22:20:06 +01:00
CanbiZ (MickLesk)
900200ec6d fix(build): correct storage size formatting bugs
- Fix select_storage(): use --from-unit=1024 instead of --from-unit=K
- Fix resolve_storage_preselect(): add missing --from-unit=1024
- pvesm outputs KiB (1024-byte blocks), not 1000-byte blocks
- Fixes incorrect MB display instead of GB
2026-01-22 10:49:47 +01:00
vhsdream
63734bd544 restore ensure_profile_loaded to core.func
Some checks failed
Update Versions from GitHub / update-versions (push) Has been cancelled
Cleanup Branches (Merged or Closed) / cleanup (push) Has been cancelled
2026-01-21 19:17:22 -05:00
CanbiZ (MickLesk)
0481d5ccf7 fix(tools): sanitize version string for filename
Replace @ and / with _ in filename to avoid invalid paths like
papra-@papra/docker@26.0.0.tar.gz
2026-01-21 16:30:55 +01:00
CanbiZ (MickLesk)
fc8433ad8b fix(tools): use codeload directly for tags with special chars (@/)
Skip failed github.com attempt entirely for scoped tags like @papra/docker@26.0.0
2026-01-21 16:19:58 +01:00
CanbiZ (MickLesk)
fe9c5d2285 fix(tools): remove partial file before fallback download attempt 2026-01-21 16:09:30 +01:00
CanbiZ (MickLesk)
665907592e fix(tools): add codeload.github.com fallback for complex tag names
- Primary URL github.com/archive/refs/tags/ tried first
- Fallback to codeload.github.com for tags with special chars (@scope/pkg@ver)
- Only encode @ in fallback URL, keep / unencoded for codeload compatibility
2026-01-21 15:59:06 +01:00
CanbiZ (MickLesk)
c2b890baa6 Improve validation and robustness in container scripts
Enhances timezone handling by mapping 'Etc/*' zones to 'host', adds stricter password validation (removing leading dashes and enforcing minimum length), and improves container ID validation. Adds storage space validation before container creation and when selecting storage. Implements retry logic and stale lock cleanup for template lock files to avoid stuck processes. Improves GitHub release fetching by adding a fallback to codeload.github.com for complex tag names.
2026-01-21 15:48:22 +01:00
CanbiZ (MickLesk)
eb4c45c9fe Big Merge -> build.func (VE) to VED Compared. 2026-01-21 14:44:57 +01:00
CanbiZ (MickLesk)
eb605f0c33 merge core from VE to VED 2026-01-21 14:35:32 +01:00
CanbiZ (MickLesk)
db5e26f4f1 merge tools.func from VE to VED 2026-01-21 14:30:44 +01:00
justin
9575fd7188
Make which & tar are installed for RHEL-based OSs 2026-01-18 15:45:22 -05:00
CanbiZ
24b46ee21c testing 2026-01-15 10:47:54 +01:00
CanbiZ
82053c5b70 refactor rustypaste and add alpine-tools 2026-01-15 10:04:43 +01:00
CanbiZ
5e8d2565c4 cleanup
cleanup
2026-01-15 09:36:29 +01:00
CanbiZ
8540bc3627 fixes 2026-01-14 15:49:44 +01:00