mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-08-02 09:14:48 +02:00
Fixed formatting and typos in documentation
This commit is contained in:
parent
47fc7db953
commit
f32c0f52b6
24 changed files with 1512 additions and 730 deletions
|
@ -7,17 +7,18 @@ nav_order: 2
|
|||
|
||||
# Installation of Part-DB via docker
|
||||
|
||||
Part-DB can be installed containerized via docker. This is the easiest way to get Part-DB up and running and works on all platforms,
|
||||
where docker is available (especially recommended for Windows and MacOS).
|
||||
|
||||
Part-DB can be installed containerized via docker. This is the easiest way to get Part-DB up and running and works on
|
||||
all platforms,
|
||||
where docker is available (especially recommended for Windows and macOS).
|
||||
|
||||
{: .warning }
|
||||
> The methods described here, configure PHP without HTTPS and therefore should only be used locally in a trusted network.
|
||||
> 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
|
||||
Docker-compose configures the needed images and automatically creates the needed containers and volumes.
|
||||
|
||||
Docker-compose configures the needed images and automatically creates the needed containers and volumes.
|
||||
|
||||
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
|
||||
|
@ -68,19 +69,28 @@ services:
|
|||
# When this is empty the content of config/banner.md is used as banner
|
||||
#- BANNER=This is a test banner<br>with a line break
|
||||
```
|
||||
4. Customize the settings by changing the environment variables (or add new ones). See [Configuration]({% link configuration.md %}) for more information.
|
||||
|
||||
4. Customize the settings by changing the environment variables (or add new ones). See [Configuration]({% link
|
||||
configuration.md %}) for more information.
|
||||
5. Inside the folder, run
|
||||
|
||||
```bash
|
||||
docker-compose up -d
|
||||
```
|
||||
6. Create the inital database with
|
||||
|
||||
6. Create the initial 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.
|
||||
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.
|
||||
|
||||
### MySQL
|
||||
|
||||
|
@ -156,8 +166,10 @@ services:
|
|||
```
|
||||
|
||||
### Update Part-DB
|
||||
|
||||
You can update Part-DB by pulling the latest image and restarting the container.
|
||||
Then you have to run the database migrations again
|
||||
|
||||
```bash
|
||||
docker-compose pull
|
||||
docker-compose up -d
|
||||
|
@ -165,19 +177,26 @@ docker exec --user=www-data partdb php bin/console doctrine:migrations:migrate
|
|||
```
|
||||
|
||||
## Direct use of docker image
|
||||
You can use the `jbtronics/part-db1:master` image directly. You have to expose the port 80 to a host port and configure volumes for `/var/www/html/uploads` and `/var/www/html/public/media`.
|
||||
|
||||
If you want to use SQLite database (which is default), you have to configure Part-DB to put the database file in a mapped volume via the `DATABASE_URL` environment variable.
|
||||
For example if you set `DATABASE_URL=sqlite:///%kernel.project_dir%/var/db/app.db` then you will have to map the `/var/www/html/var/db/` folder to the docker container (see docker-compose.yaml for example).
|
||||
You can use the `jbtronics/part-db1:master` image directly. You have to expose the port 80 to a host port and configure
|
||||
volumes for `/var/www/html/uploads` and `/var/www/html/public/media`.
|
||||
|
||||
If you want to use SQLite database (which is default), you have to configure Part-DB to put the database file in a
|
||||
mapped volume via the `DATABASE_URL` environment variable.
|
||||
For example if you set `DATABASE_URL=sqlite:///%kernel.project_dir%/var/db/app.db` then you will have to map
|
||||
the `/var/www/html/var/db/` folder to the docker container (see docker-compose.yaml for example).
|
||||
|
||||
You also have to create the database like described above in step 4.
|
||||
|
||||
## Running console commands
|
||||
You can run the console commands described in README by executing `docker exec --user=www-data -it partdb bin/console [command]`
|
||||
|
||||
You can run the console commands described in README by
|
||||
executing `docker exec --user=www-data -it partdb bin/console [command]`
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
*Login not possible. Login page is just reloading and no error message is shown or something like "CSFR token invalid"*:
|
||||
|
||||
Clear all cookies in your browser or use a inkognito tab for Part-DB.
|
||||
This related to the fact that Part-DB can not set cookies via HTTP, after some webpage has set cookies before under localhost via https. This is a security mechanism of the browser and can not be bypassed by Part-DB.
|
||||
Clear all cookies in your browser or use an inkognito tab for Part-DB.
|
||||
This related to the fact that Part-DB can not set cookies via HTTP, after some webpage has set cookies before under
|
||||
localhost via https. This is a security mechanism of the browser and can not be bypassed by Part-DB.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue