Compare commits

..

1 Commits

Author SHA1 Message Date
push-app-to-main[bot] 4d39707844 Add valhalla (ct) 2026-09-12 23:47:32 +00:00
5 changed files with 438 additions and 173 deletions
-166
View File
@@ -1,169 +1,3 @@
## 2026-09-12
### 🆕 New Scripts
- Elasticsearch ([#17188](https://github.com/community-scripts/ProxmoxVE/pull/17188))
- Hammer ([#17189](https://github.com/community-scripts/ProxmoxVE/pull/17189))
- gotenberg ([#17205](https://github.com/community-scripts/ProxmoxVE/pull/17205))
### 🚀 Updated Scripts
- #### 🐞 Bug Fixes
- fix(dispatcharr): add comskip installation and build dependencies [@eXistC](https://github.com/eXistC) ([#16224](https://github.com/community-scripts/ProxmoxVE/pull/16224))
- poznote: serve from src/public docroot [@MickLesk](https://github.com/MickLesk) ([#17187](https://github.com/community-scripts/ProxmoxVE/pull/17187))
- calibre-web: use calibreweb release identifier to avoid version file collision [@MickLesk](https://github.com/MickLesk) ([#17186](https://github.com/community-scripts/ProxmoxVE/pull/17186))
- #### ✨ New Features
- Docker VM: Feature Bump - Refactor script for improved functionality [@MickLesk](https://github.com/MickLesk) ([#17216](https://github.com/community-scripts/ProxmoxVE/pull/17216))
- feat(jitsi-meet): optional public setup (FQDN, Let's Encrypt, NAT, secure domain) [@klanghans](https://github.com/klanghans) ([#17132](https://github.com/community-scripts/ProxmoxVE/pull/17132))
- #### 🔧 Refactor
- Paperless-NGX: add --no-sync to uv run services [@MickLesk](https://github.com/MickLesk) ([#17210](https://github.com/community-scripts/ProxmoxVE/pull/17210))
### 💾 Core
- VM's: show the selected CPU model instead of doubling it [@MickLesk](https://github.com/MickLesk) ([core#37](https://github.com/community-scripts/core/pull/37))
- Generate app headers [@github-actions[bot]](https://github.com/github-actions[bot]) ([core#36](https://github.com/community-scripts/core/pull/36))
## 2026-09-11
### 🆕 New Scripts
- Lemonade-Server ([#17190](https://github.com/community-scripts/ProxmoxVE/pull/17190))
- OneTimeSecret ([#17097](https://github.com/community-scripts/ProxmoxVE/pull/17097))
### 🚀 Updated Scripts
- #### 🐞 Bug Fixes
- update authentik to 2026.8.2 [@thieneret](https://github.com/thieneret) ([#17198](https://github.com/community-scripts/ProxmoxVE/pull/17198))
- passwordpusher: restore data before running migrations [@MickLesk](https://github.com/MickLesk) ([#17141](https://github.com/community-scripts/ProxmoxVE/pull/17141))
- paperclip: install the rust toolchain needed by the runner build [@MickLesk](https://github.com/MickLesk) ([#17142](https://github.com/community-scripts/ProxmoxVE/pull/17142))
- homepage: run next directly instead of through pnpm [@MickLesk](https://github.com/MickLesk) ([#17155](https://github.com/community-scripts/ProxmoxVE/pull/17155))
- changedetection: fix: pin browserless [@CrazyWolf13](https://github.com/CrazyWolf13) ([#17163](https://github.com/community-scripts/ProxmoxVE/pull/17163))
### 💾 Core
- #### 🐞 Bug Fixes
- core.func: fall back to a usable HOME when the shell has none [@MickLesk](https://github.com/MickLesk) ([#17154](https://github.com/community-scripts/ProxmoxVE/pull/17154))
### 🧰 Tools
- Dockhand ([#17191](https://github.com/community-scripts/ProxmoxVE/pull/17191))
- #### 🐞 Bug Fixes
- update-apps: rewrite the retired Gitea base in every container before updating it [@MickLesk](https://github.com/MickLesk) ([#17156](https://github.com/community-scripts/ProxmoxVE/pull/17156))
- #### 🔧 Refactor
- Rename lxc-delete.sh to guest-delete.sh [@MickLesk](https://github.com/MickLesk) ([#17152](https://github.com/community-scripts/ProxmoxVE/pull/17152))
### 📚 Documentation
- issue template: add PVE release, execution context and phase; refresh distro list / pve versions [@MickLesk](https://github.com/MickLesk) ([#17160](https://github.com/community-scripts/ProxmoxVE/pull/17160))
## 2026-09-10
### 🆕 New Scripts
- Chevereto ([#17131](https://github.com/community-scripts/ProxmoxVE/pull/17131))
- Portabase ([#17111](https://github.com/community-scripts/ProxmoxVE/pull/17111))
- Logseq ([#17112](https://github.com/community-scripts/ProxmoxVE/pull/17112))
- Safebucket ([#17096](https://github.com/community-scripts/ProxmoxVE/pull/17096))
### 🚀 Updated Scripts
- #### 🐞 Bug Fixes
- Immich v3.2.0 [@vhsdream](https://github.com/vhsdream) ([#17137](https://github.com/community-scripts/ProxmoxVE/pull/17137))
- fix(solidtime): prevent composer install from hanging on root prompt [@supersoju](https://github.com/supersoju) ([#17146](https://github.com/community-scripts/ProxmoxVE/pull/17146))
- fix(hermesagent): wait for root gateway cleanup [@steveonjava](https://github.com/steveonjava) ([#17147](https://github.com/community-scripts/ProxmoxVE/pull/17147))
### 💾 Core
- Keep the script name when regenerating the entrypoint [@MickLesk](https://github.com/MickLesk) ([core#35](https://github.com/community-scripts/core/pull/35))
- Rewrite the dead Gitea base onto GitHub instead of failing the update [@MickLesk](https://github.com/MickLesk) ([core#33](https://github.com/community-scripts/core/pull/33))
- core.func: fall back to a usable HOME when the shell has none [@MickLesk](https://github.com/MickLesk) ([core#32](https://github.com/community-scripts/core/pull/32))
## 2026-09-09
### 🆕 New Scripts
- Lingarr ([#17130](https://github.com/community-scripts/ProxmoxVE/pull/17130))
### 🚀 Updated Scripts
- vm: drop the discussions link from the summary [@MickLesk](https://github.com/MickLesk) ([#17117](https://github.com/community-scripts/ProxmoxVE/pull/17117))
- #### 🐞 Bug Fixes
- fix(hermesagent): stop spurious root gateway after update [@steveonjava](https://github.com/steveonjava) ([#17126](https://github.com/community-scripts/ProxmoxVE/pull/17126))
## 2026-09-08
### 🆕 New Scripts
- Decypharr ([#17108](https://github.com/community-scripts/ProxmoxVE/pull/17108))
- Stash ([#17106](https://github.com/community-scripts/ProxmoxVE/pull/17106))
### 🚀 Updated Scripts
- #### 🐞 Bug Fixes
- Update Jellyfin FFmpeg dependency to version 8 [@MickLesk](https://github.com/MickLesk) ([#17109](https://github.com/community-scripts/ProxmoxVE/pull/17109))
### 💾 Core
- Treat a cut-short forge response as a failure, not as HTTP 200 [@MickLesk](https://github.com/MickLesk) ([core#31](https://github.com/community-scripts/core/pull/31))
- Generate app headers [@github-actions[bot]](https://github.com/github-actions[bot]) ([core#28](https://github.com/community-scripts/core/pull/28))
- cloud-init: drop the "configure in Proxmox UI" hint [@MickLesk](https://github.com/MickLesk) ([core#30](https://github.com/community-scripts/core/pull/30))
- Survive an empty /usr/bin/update instead of aborting the run [@MickLesk](https://github.com/MickLesk) ([core#29](https://github.com/community-scripts/core/pull/29))
## 2026-09-07
### 🆕 New Scripts
- Chatwoot ([#17095](https://github.com/community-scripts/ProxmoxVE/pull/17095))
- whisparr-eros ([#17094](https://github.com/community-scripts/ProxmoxVE/pull/17094))
- Matter-Hub ([#17093](https://github.com/community-scripts/ProxmoxVE/pull/17093))
- Journiv ([#17092](https://github.com/community-scripts/ProxmoxVE/pull/17092))
### 🚀 Updated Scripts
- #### 🐞 Bug Fixes
- kaneo: bump Node.js from 22 to 24 [@github-actions[bot]](https://github.com/github-actions[bot]) ([#17086](https://github.com/community-scripts/ProxmoxVE/pull/17086))
- iobroker: bump Node.js from 24 to 26 [@github-actions[bot]](https://github.com/github-actions[bot]) ([#17085](https://github.com/community-scripts/ProxmoxVE/pull/17085))
- reactive-resume: repair any wrong WorkingDirectory on update [@MickLesk](https://github.com/MickLesk) ([#17068](https://github.com/community-scripts/ProxmoxVE/pull/17068))
- mediamtx: keep mediamtx.yml across updates [@MickLesk](https://github.com/MickLesk) ([#17069](https://github.com/community-scripts/ProxmoxVE/pull/17069))
- omnitools: allow remote action while npm ci [@MickLesk](https://github.com/MickLesk) ([#17070](https://github.com/community-scripts/ProxmoxVE/pull/17070))
- #### ✨ New Features
- netboot-xyz: add Secure Boot and Legacy assets [@MickLesk](https://github.com/MickLesk) ([#17066](https://github.com/community-scripts/ProxmoxVE/pull/17066))
- #### 🔧 Refactor
- flatnotes: follow upstream move to uv and Python 3.13 [@MickLesk](https://github.com/MickLesk) ([#17090](https://github.com/community-scripts/ProxmoxVE/pull/17090))
- heimdall: set up PHP 8.4 on update, keep only the database, run migrations [@MickLesk](https://github.com/MickLesk) ([#17067](https://github.com/community-scripts/ProxmoxVE/pull/17067))
### 📂 Github
- github: Open per-script Node bump PRs [@MickLesk](https://github.com/MickLesk) ([#17065](https://github.com/community-scripts/ProxmoxVE/pull/17065))
## 2026-09-06
### 🚀 Updated Scripts
- #### 🐞 Bug Fixes
- Fix Sonarqube update script to add +x on sonar.sh [@jarihu](https://github.com/jarihu) ([#17056](https://github.com/community-scripts/ProxmoxVE/pull/17056))
## 2026-09-05
### 🚀 Updated Scripts
+141 -7
View File
@@ -101,9 +101,6 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
@@ -117,7 +114,7 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
<details>
<summary><h4>September (12 entries)</h4></summary>
<summary><h4>September (5 entries)</h4></summary>
[View September 2026 Changelog](.github/changelogs/2026/09.md)
@@ -543,8 +540,6 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
</details>
## 2026-09-13
## 2026-09-12
### 🆕 New Scripts
@@ -1191,4 +1186,143 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
- #### 🔧 Refactor
- Refactor: PowerDNS move poweradmin database outside the web root [@MickLesk](https://github.com/MickLesk) ([#16476](https://github.com/community-scripts/ProxmoxVE/pull/16476))
- paperless-ngx: run services with uv --no-sync to avoid startup network dependency [@MickLesk](https://github.com/MickLesk) ([#16479](https://github.com/community-scripts/ProxmoxVE/pull/16479))
- paperless-ngx: run services with uv --no-sync to avoid startup network dependency [@MickLesk](https://github.com/MickLesk) ([#16479](https://github.com/community-scripts/ProxmoxVE/pull/16479))
## 2026-08-13
### 🆕 New Scripts
- SuggestArr ([#16449](https://github.com/community-scripts/ProxmoxVE/pull/16449))
### 🚀 Updated Scripts
- #### 🐞 Bug Fixes
- fix(stirling-pdf): LibreOffice listener collides with unoserver on UNO port 2002, burning a core [@angusmaul](https://github.com/angusmaul) ([#16460](https://github.com/community-scripts/ProxmoxVE/pull/16460))
- fix(reitti): enable SNI for tile cache [@kylemd](https://github.com/kylemd) ([#16463](https://github.com/community-scripts/ProxmoxVE/pull/16463))
- [wanderer] refactor [@johanngrobe](https://github.com/johanngrobe) ([#16448](https://github.com/community-scripts/ProxmoxVE/pull/16448))
- #### ✨ New Features
- feat: Update koillection-install.sh to support API usage [@Crazy-Duck](https://github.com/Crazy-Duck) ([#16425](https://github.com/community-scripts/ProxmoxVE/pull/16425))
## 2026-08-12
### 🆕 New Scripts
- Stalwart ([#16388](https://github.com/community-scripts/ProxmoxVE/pull/16388))
### 🚀 Updated Scripts
- #### 🐞 Bug Fixes
- networkoptimizer: mitigate dotnet publish hang in LXC [@MickLesk](https://github.com/MickLesk) ([#16436](https://github.com/community-scripts/ProxmoxVE/pull/16436))
- lazylibrarian: reinstall deps after git pull on update [@MickLesk](https://github.com/MickLesk) ([#16435](https://github.com/community-scripts/ProxmoxVE/pull/16435))
- wanderer: fix deprecated meilisearch upgrade flag [@MickLesk](https://github.com/MickLesk) ([#16434](https://github.com/community-scripts/ProxmoxVE/pull/16434))
- calibre-web: fix release asset filename pattern [@MickLesk](https://github.com/MickLesk) ([#16433](https://github.com/community-scripts/ProxmoxVE/pull/16433))
- fix(stirling-pdf): unoserver installed into the venv, and login mode truncates .env [@angusmaul](https://github.com/angusmaul) ([#16439](https://github.com/community-scripts/ProxmoxVE/pull/16439))
- fix(pulse): keep the container recoverable when an update fails [@rcourtman](https://github.com/rcourtman) ([#16311](https://github.com/community-scripts/ProxmoxVE/pull/16311))
- #### 🔧 Refactor
- ConvertX: add some new dependencies [@MickLesk](https://github.com/MickLesk) ([#16437](https://github.com/community-scripts/ProxmoxVE/pull/16437))
## 2026-08-11
### 🚀 Updated Scripts
- Update source URL for Reactive Resume [@MickLesk](https://github.com/MickLesk) ([#16407](https://github.com/community-scripts/ProxmoxVE/pull/16407))
- #### 🐞 Bug Fixes
- Pelican-Panel: add php artisan p:environment:database [@MickLesk](https://github.com/MickLesk) ([#16397](https://github.com/community-scripts/ProxmoxVE/pull/16397))
- outline: fix URL sed matching wrong line in .env.sample // refactor .env generation [@MickLesk](https://github.com/MickLesk) ([#16408](https://github.com/community-scripts/ProxmoxVE/pull/16408))
- paperless-ngx: reindex Tantivy search index on webserver start [@MickLesk](https://github.com/MickLesk) ([#16395](https://github.com/community-scripts/ProxmoxVE/pull/16395))
- karakeep: pin Node.js to 22 LTS, avoid Node 24.19 better-sqlite3 crash [@MickLesk](https://github.com/MickLesk) ([#16396](https://github.com/community-scripts/ProxmoxVE/pull/16396))
- #### ✨ New Features
- Open WebUI: add optional OpenTelemetry package install [@irishpadres](https://github.com/irishpadres) ([#16415](https://github.com/community-scripts/ProxmoxVE/pull/16415))
### 🧰 Tools
- #### 🐞 Bug Fixes
- fix(add-tailscale-lxc): stop spinner before whiptail menu [@halcycon](https://github.com/halcycon) ([#16402](https://github.com/community-scripts/ProxmoxVE/pull/16402))
- #### 🔧 Refactor
- arcane: fix projects/builds dir ownership for non-root container UID [@MickLesk](https://github.com/MickLesk) ([#16411](https://github.com/community-scripts/ProxmoxVE/pull/16411))
## 2026-08-10
### 🆕 New Scripts
- GitLab ([#16386](https://github.com/community-scripts/ProxmoxVE/pull/16386))
- TeslaMate ([#16385](https://github.com/community-scripts/ProxmoxVE/pull/16385))
- tor-snowflake ([#15684](https://github.com/community-scripts/ProxmoxVE/pull/15684))
### 🚀 Updated Scripts
- #### 🐞 Bug Fixes
- ErsatzTV: update ffmpeg to 8.1 version [@MickLesk](https://github.com/MickLesk) ([#16383](https://github.com/community-scripts/ProxmoxVE/pull/16383))
### 🧰 Tools
- post-pdm-install ([#16368](https://github.com/community-scripts/ProxmoxVE/pull/16368))
## 2026-08-09
### 🚀 Updated Scripts
- #### 🐞 Bug Fixes
- Fix: CouchDB Erlang cookie breaks vm.args (use hex) [@fudianchn](https://github.com/fudianchn) ([#16361](https://github.com/community-scripts/ProxmoxVE/pull/16361))
- SparkyFitness: Install Git for frontend builds [@MickLesk](https://github.com/MickLesk) ([#16352](https://github.com/community-scripts/ProxmoxVE/pull/16352))
- Byparr: Use invisible-playwright browser setup [@MickLesk](https://github.com/MickLesk) ([#16353](https://github.com/community-scripts/ProxmoxVE/pull/16353))
- Crafty Controller: Restore ownership after updates [@MickLesk](https://github.com/MickLesk) ([#16354](https://github.com/community-scripts/ProxmoxVE/pull/16354))
- Webtrees: Fix schema check in silent mode [@MickLesk](https://github.com/MickLesk) ([#16355](https://github.com/community-scripts/ProxmoxVE/pull/16355))
- SigNoz: Allow legacy metadata schema on ClickHouse 26 [@MickLesk](https://github.com/MickLesk) ([#16356](https://github.com/community-scripts/ProxmoxVE/pull/16356))
### 🧰 Tools
- #### ✨ New Features
- Portainer: Update existing CE and BE installations [@MickLesk](https://github.com/MickLesk) ([#16357](https://github.com/community-scripts/ProxmoxVE/pull/16357))
### 📚 Documentation
- github: update Star History links and image sources [@MickLesk](https://github.com/MickLesk) ([#16367](https://github.com/community-scripts/ProxmoxVE/pull/16367))
## 2026-08-08
### 🆕 New Scripts
- Ignis ([#16330](https://github.com/community-scripts/ProxmoxVE/pull/16330))
### 💾 Core
- #### ✨ New Features
- core - setup_nodejs: bypass npm allowScripts policy globally on npm >=11 [@MickLesk](https://github.com/MickLesk) ([#16280](https://github.com/community-scripts/ProxmoxVE/pull/16280))
## 2026-08-07
### 🆕 New Scripts
- NetworkOptimizer ([#16328](https://github.com/community-scripts/ProxmoxVE/pull/16328))
- Orb ([#16329](https://github.com/community-scripts/ProxmoxVE/pull/16329))
### 🚀 Updated Scripts
- #### 🐞 Bug Fixes
- HortusFox: start applying db migrations [@tomfrenzel](https://github.com/tomfrenzel) ([#16324](https://github.com/community-scripts/ProxmoxVE/pull/16324))
- Docker: report container updates instead of prompting, stop auto-updating Portainer Agent, fix addon detection of legacy Portainer [@MickLesk](https://github.com/MickLesk) ([#16298](https://github.com/community-scripts/ProxmoxVE/pull/16298))
- Immich: retry mise install on transient npm download failures [@MickLesk](https://github.com/MickLesk) ([#16301](https://github.com/community-scripts/ProxmoxVE/pull/16301))
- changedetection: remove msttcorefonts to fix install hang [@austinpilz](https://github.com/austinpilz) ([#16319](https://github.com/community-scripts/ProxmoxVE/pull/16319))
- #### 🔧 Refactor
- core: extend new vars and pocketbase values [@MickLesk](https://github.com/MickLesk) ([#16313](https://github.com/community-scripts/ProxmoxVE/pull/16313))
+6
View File
@@ -0,0 +1,6 @@
_ __ ____ ____
| | / /___ _/ / /_ ____ _/ / /___ _
| | / / __ `/ / __ \/ __ `/ / / __ `/
| |/ / /_/ / / / / / /_/ / / / /_/ /
|___/\__,_/_/_/ /_/\__,_/_/_/\__,_/
+104
View File
@@ -0,0 +1,104 @@
#!/usr/bin/env bash
_CS_DEFAULT_URL="https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main"
_cs_boot="${COMMUNITY_SCRIPTS_CORE_DIR:-$(dirname "${BASH_SOURCE[0]}")/../../core}/core/build.func"
source "$_cs_boot" 2>/dev/null || source <(curl -fsSL "${COMMUNITY_SCRIPTS_CORE_URL:-https://raw.githubusercontent.com/community-scripts/core/main}/core/build.func")
# Copyright (c) 2021-2026 community-scripts ORG
# Author: CrazyWolf13
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://github.com/valhalla/valhalla
APP="Valhalla"
var_tags="${var_tags:-mapping;routing}"
var_cpu="${var_cpu:-4}"
var_ram="${var_ram:-8192}"
var_disk="${var_disk:-24}"
var_os="${var_os:-debian}"
var_version="${var_version:-13}"
#var_arm64="${var_arm64:-no}" # unset = ask the user; set yes/no only when verified
var_unprivileged="${var_unprivileged:-1}"
header_info "$APP"
variables
color
catch_errors
function update_script() {
header_info
check_container_storage
check_container_resources
if [[ ! -f /etc/systemd/system/valhalla.service ]]; then
msg_error "No ${APP} Installation Found!"
exit
fi
if check_for_gh_release "prime_server" "kevinkreiser/prime_server"; then
RELEASE="$CHECK_UPDATE_RELEASE"
msg_info "Stopping Service"
systemctl stop valhalla
msg_ok "Stopped Service"
msg_info "Building prime_server ${RELEASE} (Patience)"
rm -rf /tmp/prime_server
git clone --recurse-submodules --depth 1 --branch "$RELEASE" https://github.com/kevinkreiser/prime_server /tmp/prime_server
cd /tmp/prime_server
$STD ./autogen.sh
$STD ./configure
$STD make -j"$(nproc)"
$STD make install
cd /
rm -rf /tmp/prime_server
ldconfig
echo "${RELEASE#v}" >"$HOME/.prime_server"
msg_ok "Built prime_server ${RELEASE}"
msg_info "Starting Service"
systemctl start valhalla
msg_ok "Started Service"
fi
if check_for_gh_release "valhalla" "valhalla/valhalla"; then
RELEASE="$CHECK_UPDATE_RELEASE"
msg_info "Stopping Service"
systemctl stop valhalla
msg_ok "Stopped Service"
msg_info "Fetching Valhalla ${RELEASE} (Patience)"
rm -rf /opt/valhalla
git clone --recurse-submodules --depth 1 --branch "$RELEASE" https://github.com/valhalla/valhalla.git /opt/valhalla
msg_ok "Fetched Valhalla ${RELEASE}"
msg_info "Compiling Valhalla ${RELEASE} (this takes 20-45+ minutes, be patient)"
MEM_MB=$(awk '/MemTotal/{print int($2/1024)}' /proc/meminfo)
BUILD_JOBS=$((MEM_MB / 2000))
[[ $BUILD_JOBS -lt 1 ]] && BUILD_JOBS=1
[[ $BUILD_JOBS -gt $(nproc) ]] && BUILD_JOBS=$(nproc)
cd /opt/valhalla
$STD cmake -B build -DCMAKE_BUILD_TYPE=Release -DENABLE_PYTHON_BINDINGS=OFF -DENABLE_TESTS=OFF -DENABLE_SINGLE_FILES_WERROR=OFF
$STD cmake --build build -- -j"$BUILD_JOBS"
$STD cmake --install build
ldconfig
echo "${RELEASE#v}" >"$HOME/.valhalla"
msg_ok "Compiled Valhalla ${RELEASE}"
msg_info "Starting Service"
systemctl start valhalla
msg_ok "Started Service"
fi
msg_ok "Updated Successfully!\n"
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 "${GATEWAY}${BGN}http://${IP}:8002/status${CL}"
echo -e "${INFO}${YW}No routing tiles are built yet. Build them for your region with:${CL}"
echo -e "${TAB}${BGN}/opt/valhalla_data/build-tiles.sh https://download.geofabrik.de/<continent>/<region>-latest.osm.pbf${CL}"
+187
View File
@@ -0,0 +1,187 @@
#!/usr/bin/env bash
# Copyright (c) 2021-2026 community-scripts ORG
# Author: CrazyWolf13
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://github.com/valhalla/valhalla
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 \
autoconf \
automake \
ccache \
clang \
clang-tidy \
coreutils \
cmake \
g++ \
gcc \
git \
jq \
lcov \
libboost-all-dev \
libcurl4-openssl-dev \
libczmq-dev \
libgdal-dev \
libgeos++-dev \
libgeos-dev \
libluajit-5.1-dev \
liblz4-dev \
libprotobuf-dev \
libspatialite-dev \
libsqlite3-dev \
libsqlite3-mod-spatialite \
libtool \
libzmq3-dev \
lld \
locales \
luajit \
make \
osmium-tool \
parallel \
pkgconf \
protobuf-compiler \
python3-all-dev \
python3-shapely \
python3-requests \
python3-pip \
spatialite-bin \
unzip \
zlib1g-dev
msg_ok "Installed Dependencies"
PRIME_SERVER_RELEASE=$(get_latest_github_release "kevinkreiser/prime_server" "false")
msg_info "Building prime_server ${PRIME_SERVER_RELEASE} (Patience)"
git clone --recurse-submodules --depth 1 --branch "$PRIME_SERVER_RELEASE" https://github.com/kevinkreiser/prime_server /tmp/prime_server
cd /tmp/prime_server
$STD ./autogen.sh
$STD ./configure
$STD make -j"$(nproc)"
$STD make install
cd /
rm -rf /tmp/prime_server
echo "${PRIME_SERVER_RELEASE#v}" >"$HOME/.prime_server"
msg_ok "Built prime_server"
RELEASE=$(get_latest_github_release "valhalla/valhalla" "false")
msg_info "Cloning Valhalla ${RELEASE} (Patience)"
mkdir -p /opt/valhalla
git clone --recurse-submodules --depth 1 --branch "$RELEASE" https://github.com/valhalla/valhalla.git /opt/valhalla
msg_ok "Cloned Valhalla ${RELEASE}"
msg_info "Compiling Valhalla ${RELEASE} (this takes 20-45+ minutes, be patient)"
MEM_MB=$(awk '/MemTotal/{print int($2/1024)}' /proc/meminfo)
BUILD_JOBS=$((MEM_MB / 2000))
[[ $BUILD_JOBS -lt 1 ]] && BUILD_JOBS=1
[[ $BUILD_JOBS -gt $(nproc) ]] && BUILD_JOBS=$(nproc)
cd /opt/valhalla
$STD cmake -B build -DCMAKE_BUILD_TYPE=Release -DENABLE_PYTHON_BINDINGS=OFF -DENABLE_TESTS=OFF -DENABLE_SINGLE_FILES_WERROR=OFF
$STD cmake --build build -- -j"$BUILD_JOBS"
$STD cmake --install build
ldconfig
echo "${RELEASE#v}" >"$HOME/.valhalla"
msg_ok "Compiled Valhalla ${RELEASE}"
msg_info "Configuring Valhalla"
useradd --system --no-create-home --shell /usr/sbin/nologin valhalla 2>/dev/null || true
mkdir -p /opt/valhalla_data/{valhalla_tiles,pbf}
THREADS=$(nproc)
valhalla_build_config \
--mjolnir-tile-dir /opt/valhalla_data/valhalla_tiles \
--mjolnir-tile-extract /opt/valhalla_data/valhalla_tiles.tar \
--mjolnir-admin /opt/valhalla_data/admins.sqlite \
--mjolnir-timezone /opt/valhalla_data/timezones.sqlite \
--mjolnir-concurrency "$THREADS" \
>/opt/valhalla_data/valhalla.json
cat <<'EOF' >/opt/valhalla_data/build-tiles.sh
#!/usr/bin/env bash
# (Re)builds Valhalla routing tiles from one or more OSM extracts.
# Usage: build-tiles.sh <pbf-url-or-path> [<pbf-url-or-path> ...]
# Example: build-tiles.sh https://download.geofabrik.de/europe/germany-latest.osm.pbf
set -euo pipefail
export PATH="/usr/local/bin:/usr/local/sbin:$PATH"
if [[ $# -eq 0 ]]; then
echo "Usage: $0 <pbf-url-or-path> [<pbf-url-or-path> ...]" >&2
exit 1
fi
DATA_DIR=/opt/valhalla_data
CONFIG="$DATA_DIR/valhalla.json"
mkdir -p "$DATA_DIR/pbf"
FILES=()
for src in "$@"; do
if [[ "$src" == http://* || "$src" == https://* ]]; then
fname="$DATA_DIR/pbf/$(basename "$src")"
echo "Downloading $src"
curl -fL --progress-bar -o "$fname" "$src"
else
fname="$src"
fi
FILES+=("$fname")
done
systemctl stop valhalla
echo "Building admin database"
valhalla_build_admins --config "$CONFIG" "${FILES[@]}"
echo "Building timezone database"
valhalla_build_timezones >"$DATA_DIR/timezones.sqlite"
echo "Building initial tile graph"
valhalla_build_tiles -c "$CONFIG" -e build "${FILES[@]}"
echo "Enhancing tile graph"
valhalla_build_tiles -c "$CONFIG" -s enhance "${FILES[@]}"
echo "Packing tiles into a single extract"
valhalla_build_extract -c "$CONFIG" -v
chown -R valhalla:valhalla "$DATA_DIR"
systemctl start valhalla
echo "Done. Tiles are in $DATA_DIR/valhalla_tiles (and packed at $DATA_DIR/valhalla_tiles.tar)."
EOF
chmod +x /opt/valhalla_data/build-tiles.sh
chown -R valhalla:valhalla /opt/valhalla_data
msg_ok "Configured Valhalla"
msg_info "Creating Service"
cat <<EOF >/etc/systemd/system/valhalla.service
[Unit]
Description=Valhalla Routing Engine
After=network.target
[Service]
Type=simple
User=valhalla
Group=valhalla
WorkingDirectory=/opt/valhalla_data
ExecStart=/usr/local/bin/valhalla_service /opt/valhalla_data/valhalla.json ${THREADS}
Restart=on-failure
RestartSec=5
[Install]
WantedBy=multi-user.target
EOF
systemctl enable -q --now valhalla
msg_ok "Created Service"
if [[ -n "${VALHALLA_PBF_URLS:-}" ]]; then
msg_info "Building Initial Tiles from VALHALLA_PBF_URLS (this can take a long time)"
$STD /opt/valhalla_data/build-tiles.sh $VALHALLA_PBF_URLS
msg_ok "Built Initial Tiles"
fi
motd_ssh
customize
cleanup_lxc