mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-07-24 04:44:35 +02:00
Improved documentation
This commit is contained in:
parent
1a86dd2487
commit
3a4aa6785d
13 changed files with 227 additions and 21 deletions
|
@ -9,6 +9,7 @@ nav_order: 1
|
|||
|
||||
Part-DB saves its data in a [relational (SQL) database](https://en.wikipedia.org/wiki/Relational_database). Part-DB supports either the use of [SQLite](https://www.sqlite.org/index.html) or [MySQL](https://www.mysql.com/) / [MariaDB](https://mariadb.org/) (which are mostly the same, except for some minor differences).
|
||||
|
||||
{: .important }
|
||||
You have to choose between the database types before you start using Part-DB and **you can not change it (easily) after you have started creating data**. So you should choose the database type for your usecase (and possible future uses).
|
||||
|
||||
## Comparison
|
||||
|
|
|
@ -2,23 +2,33 @@
|
|||
title: Installation using Docker
|
||||
layout: default
|
||||
parent: Installation
|
||||
nav_order: 2
|
||||
---
|
||||
|
||||
# Installation of Part-DB via docker
|
||||
|
||||
**Warning: The methods described here, configure PHP without HTTPS and therefore should only be used locally. If you want to expose Part-DB to the internet, you have to configure a reverse proxy!**
|
||||
{: .warning }
|
||||
> The methods described here, configure PHP without HTTPS and therefore should only be used locally in a trusted network.
|
||||
> If you want to expose Part-DB to the internet, you have to configure a reverse proxy with an SSL certificate!
|
||||
|
||||
## Docker-compose
|
||||
Part-DB can be installed via docker. A pre-built docker image is available under [jbtronics/part-db1](https://hub.docker.com/repository/docker/jbtronics/part-db1/).
|
||||
In the moment the master tag should be used (which is built from the latest commits in the master branch), as no tagged releases are available yet.
|
||||
|
||||
The easiest way to use it is to use the docker-compose.yml available [here](https://raw.githubusercontent.com/Part-DB/Part-DB-symfony/master/docs/docker/docker-compose.yaml):
|
||||
0. Install docker and docker-compose like described under https://docs.docker.com/compose/install/
|
||||
1. Create a folder where the Part-DB data should live
|
||||
2. Download docker-compose.yml and move it to the folder created above
|
||||
3. Inside the folder, run `docker-compose up -d`
|
||||
4. Create the inital database with `docker exec --user=www-data partdb php bin/console doctrine:migrations:migrate` and watch for the password output
|
||||
5. Part-DB is available under `http://localhost:8080` and you can log in with username `admin` and the password shown before
|
||||
1. Install docker and docker-compose like described under https://docs.docker.com/compose/install/
|
||||
2. Create a folder where the Part-DB data should live
|
||||
3. Download docker-compose.yml and move it to the folder created above
|
||||
4. Inside the folder, run
|
||||
```bash
|
||||
docker-compose up -d
|
||||
```
|
||||
5. Create the inital database with
|
||||
```bash
|
||||
docker exec --user=www-data partdb php bin/console doctrine:migrations:migrate
|
||||
```
|
||||
and watch for the password output
|
||||
6. Part-DB is available under `http://localhost:8080` and you can log in with username `admin` and the password shown before
|
||||
|
||||
The docker image uses a SQLite database and all data (database, uploads and other media) is put into folders relative to the docker-compose.yml.
|
||||
|
||||
|
|
|
@ -2,13 +2,17 @@
|
|||
title: Direct Installation on Debian 11
|
||||
layout: default
|
||||
parent: Installation
|
||||
nav_order: 4
|
||||
---
|
||||
|
||||
# Part-DB installation guide for Debian 11 (Bullseye)
|
||||
This guide shows you how to install Part-DB directly on Debian 11 using apache2 and SQLite. This guide should work with recent Ubuntu and other Debian based distributions with little to no changes.
|
||||
Depending on what you want to do, using the prebuilt docker images may be a better choice, as you dont need to install this much dependencies. See **TODO** for more information of the docker installation.
|
||||
|
||||
**Caution: This guide shows you how to install Part-DB for use in a trusted local network. If you want to use Part-DB on the internet, you HAVE TO setup a SSL certificate for your connection!**
|
||||
{: .warning }
|
||||
> The methods described here, configure PHP without HTTPS and therefore should only be used locally in a trusted network.
|
||||
> If you want to expose Part-DB to the internet, you HAVE to configure an SSL connection!
|
||||
|
||||
|
||||
## Install prerequisites
|
||||
For the installation of Part-DB, we need some prerequisites. They can be installed by running the following command:
|
||||
|
@ -102,6 +106,12 @@ sudo yarn install
|
|||
sudo yarn build
|
||||
```
|
||||
|
||||
### Clear cache
|
||||
To ensure everything is working, clear the cache:
|
||||
```bash
|
||||
sudo -u www-data php bin/console cache:clear
|
||||
```
|
||||
|
||||
### Check if everything is installed
|
||||
To check if everything is installed, run the following command:
|
||||
```bash
|
||||
|
|
67
docs/installation/nginx.md
Normal file
67
docs/installation/nginx.md
Normal file
|
@ -0,0 +1,67 @@
|
|||
---
|
||||
title: Nginx
|
||||
layout: default
|
||||
parent: Installation
|
||||
nav_order: 10
|
||||
---
|
||||
|
||||
# Nginx
|
||||
You can also use [nginx](https://www.nginx.com/) as webserver for Part-DB. Setup Part-DB with apache is a bit easier, so
|
||||
this is the method shown in the guides. This guide assumes that you already have a working nginx installation with PHP
|
||||
configured.
|
||||
|
||||
## Setup
|
||||
1. Install composer and yarn like described in the [apache guide]({% link installation/installation_guide-debian.md %}#install-composer).
|
||||
2. Create a folder for Part-DB and install and configure it as described
|
||||
3. Instead of creating the config for apache, add the following snippet to your nginx config:
|
||||
```nginx
|
||||
server {
|
||||
# Redirect all HTTP requests to HTTPS
|
||||
listen 80;
|
||||
# Change this to your domain
|
||||
server_name parts.example.com;
|
||||
return 301 https://$host$request_uri;
|
||||
}
|
||||
server {
|
||||
# listen 80;
|
||||
listen 443 ssl;
|
||||
|
||||
# Change this to your domain
|
||||
server_name parts.example.com;
|
||||
# /var/www/partdb/ should be the path to the folder where you installed Part-DB
|
||||
root /var/www/partdb/public;
|
||||
|
||||
location / {
|
||||
try_files $uri /index.php$is_args$args;
|
||||
}
|
||||
|
||||
location ~ ^/index\.php(/|$) {
|
||||
fastcgi_pass unix:/var/run/php/php-fpm.sock;
|
||||
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
||||
include fastcgi_params;
|
||||
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
|
||||
fastcgi_param DOCUMENT_ROOT $realpath_root;
|
||||
|
||||
internal;
|
||||
}
|
||||
|
||||
location ~ \.php$ {
|
||||
return 404;
|
||||
}
|
||||
|
||||
error_log /var/log/nginx/parts.error.log;
|
||||
access_log /var/log/nginx/parts.access.log;
|
||||
|
||||
# SSL parameters
|
||||
ssl_certificate /var/www/certs/SSL/domain.cert.pem;
|
||||
ssl_certificate_key /var/www/certs/SSL/private.key.pem;
|
||||
ssl_trusted_certificate /var/www/certs/SSL/intermediate.cert.pem;
|
||||
|
||||
ssl_session_timeout 5m;
|
||||
|
||||
ssl_protocols TLSv1.2;
|
||||
ssl_ciphers HIGH:!aNULL:!MD5;
|
||||
ssl_prefer_server_ciphers on;
|
||||
}
|
||||
```
|
||||
4. Restart nginx with `sudo systemctl restart nginx` and you should be able to access Part-DB under your configured domain.
|
Loading…
Add table
Add a link
Reference in a new issue