PartDB: Difference between revisions

From FlowerHouseWiki
 
(52 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{ContainerInfo
{{ContainerInfo
|image = Froeling.jpg
|Domain = [https://parts.flowerhouse.at parts.flowerhouse.at]
|Domain = [https://parts.flowerhouse.at parts.flowerhouse.at]
|IP = 192.168.88.??
|IP = 192.168.88.16
|MAC = ??
|MAC = 32:22:DA:F2:39:1B
|Privileged = No
|Privileged = No
|OS = Debian Buster
|OS = Debian Bullseye
|RAM = 512MB
|RAM = 512MB
|Cores = 1
|Cores = 1
}}
}}


<p>The PartDB-LXC is reachable under <syntaxhighlight lang="Bash" inline>192.168.88.??</syntaxhighlight> which is located in the ServerVLAN.</p>
<p>The PartDB-LXC is reachable under <syntaxhighlight lang="Bash" inline>192.168.88.16</syntaxhighlight> which is located in the ServerVLAN.</p>
<p>The subdomain is [https://parts.flowerhouse.at parts.flowerhouse.at] which is handled by the [[ReverseProxy]].</p>
<p>The subdomain is [https://parts.flowerhouse.at parts.flowerhouse.at] which is handled by the [[ReverseProxy]].</p>
__TOC__
__TOC__
== Basic Setup ==
== Installation ==
<p>Install the required packages:</p>
[https://docs.part-db.de/installation/installation%20guide-debian.html Installation Guide]
 
== Update ==
[https://docs.part-db.de/installation/installation_guide-debian.html#update-part-db Update Guide]
 
Move into Part-DB folder
<syntaxhighlight lang="console">
cd /var/www/partdb
</syntaxhighlight>
 
Checkout master branch
<syntaxhighlight lang="console">
git checkout master
</syntaxhighlight>
 
Pull latest Part-DB version from GitHub
<syntaxhighlight lang="console">
git pull
</syntaxhighlight>
 
Checkout the latest version (or use a specific version, like described above)
<syntaxhighlight lang="console">
<syntaxhighlight lang="console">
apt install apache2 php php-mysql php-curl libapache2-mod-php php-opcache php-gettext
git checkout $(git describe --tags $(git rev-list --tags --max-count=1))
</syntaxhighlight>
</syntaxhighlight>


=== Configure Apache ===
Apply correct permission
<p>Open the following file:</p>
<syntaxhighlight lang="console">
<syntaxhighlight lang="console">
nano /etc/apache2/apache2.conf
chown -R www-data:www-data .
</syntaxhighlight>
</syntaxhighlight>


<p>And change this part:</p>
Install new composer dependencies
<syntaxhighlight lang="console">
sudo -u www-data composer install --no-dev -o
</syntaxhighlight>
 
Install yarn dependencies and build new frontend
<syntaxhighlight lang="console" line>
<syntaxhighlight lang="console" line>
<Directory /var/www/>
sudo yarn install
        Options Indexes FollowSymLinks
sudo yarn build
        AllowOverride None
        Require all granted
</Directory>
</syntaxhighlight>
</syntaxhighlight>


<p>to this:</p>
Apply new database schemas (you should do a backup of your database file /var/www/partdb/var/app.db before)
<syntaxhighlight lang="console" line>
<syntaxhighlight lang="console">
<Directory /var/www/>
sudo -u www-data php bin/console doctrine:migrations:migrate
        Options -Indexes FollowSymLinks
        AllowOverride All
        Require all granted
</Directory>
</syntaxhighlight>
</syntaxhighlight>


<p>Restart the apache service:</p>
Clear Part-DB cache
<syntaxhighlight lang="console">
<syntaxhighlight lang="console">
systemctl restart apache2
sudo -u www-data php bin/console cache:clear
</syntaxhighlight>
</syntaxhighlight>


=== Configure PHP ===
 
<p>Open the php.ini file:</p>
<syntaxhighlight lang="console">
<syntaxhighlight lang="console">
nano /etc/php5/apache2/php.ini
 
</syntaxhighlight>
</syntaxhighlight>



Latest revision as of 08:28, 24 August 2023


Network


IP: 192.168.88.16
MAC: 32:22:DA:F2:39:1B
Domain: parts.flowerhouse.at

System


OS: Debian Bullseye
RAM: 512MB
Cores: 1
Privileged: No

The PartDB-LXC is reachable under 192.168.88.16 which is located in the ServerVLAN.

The subdomain is parts.flowerhouse.at which is handled by the ReverseProxy.

Installation

Installation Guide

Update

Update Guide

Move into Part-DB folder

cd /var/www/partdb

Checkout master branch

git checkout master

Pull latest Part-DB version from GitHub

git pull

Checkout the latest version (or use a specific version, like described above)

git checkout $(git describe --tags $(git rev-list --tags --max-count=1))

Apply correct permission

chown -R www-data:www-data .

Install new composer dependencies

sudo -u www-data composer install --no-dev -o

Install yarn dependencies and build new frontend

sudo yarn install
sudo yarn build

Apply new database schemas (you should do a backup of your database file /var/www/partdb/var/app.db before)

sudo -u www-data php bin/console doctrine:migrations:migrate

Clear Part-DB cache

sudo -u www-data php bin/console cache:clear


Sources