Figured it’s time to get my parts organization in order…and I found part-db(https://github.com/Part-DB/Part-DB-server), a self-hosted PHP-based webapp to do what I want. This is the first time I step into actually installing a web app, so I’m sure a lot of info listed here is basic knowledge for some, but anyways…
I’m choosing to install part-db in a LXC container from proxmox, with debian 12 as the “guest OS”. I know, it’s not really a “guest OS” as in a VM, but you get the idea.
Creating the LXC container is pretty straightforward – just use pveam in CLI to grab the debian 12 template, then in webGUI create a container.
For whatever reason, debian 12 in LXC doesn’t come with sudo installed…? so do it manually:
apt install sudo
Installing PHP and apache2 is a bit different than what part-db documentation is described – part-db doc is based on debian 11, which doesn’t have PHP 8.1 in its repo, but debian 12 does. so we just have to install a bunch of PHP/Apache stuff. And here comes the first difference: part-db doc shows PHP 8.1, but apparently debian 12’s default repo only has PHP 8.2, so…let’s switch to:
sudo apt install php8.2 libapache2-mod-php8.2 php8.2-opcache php8.2-curl php8.2-gd php8.2-mbstring php8.2-xml php8.2-bcmath php8.2-intl php8.2-zip php8.2-xsl php8.2-sqlite3 php8.2-mysql php8.2-pgsql
NOTE: the “php8.2-pgsql” is not present in the original doc, and to be honest, is not really needed if you aren’t using PostgreSQL. The support for it was really only added 2 weeks ago, but I decided to use that rather than MySQL or sqlite, because…well, just because. I don’t have a reason. Just another container to spin up.
After that, following the installation guide is fairly straightforward. I was fooled by the word “migration” in the doc, thinking that part was not needed – turns out it is absolutely vital, because we need that step to create database schemas. Once I ran that step, everything was smooth sailing.