├── README.md ├── latest ├── docker-compose.yml ├── server_start.bat └── server_stop.bat └── stable ├── docker-compose.yml ├── server_start.bat └── server_stop.bat /README.md: -------------------------------------------------------------------------------- 1 | # Part-DB Docker Files 2 | 3 | In this repo you can find the docker-compose files for an easy install of [Part-DB](https://github.com/Part-DB/Part-DB) via Docker. 4 | 5 | ## Prerequisite 6 | For the next steps you will need a working installation of Docker and docker-compose. 7 | 8 | ## Installation via Docker-Compose (Recommended) 9 | 10 | There are two "stability" levels available: 11 | * stable: Use the files in this folder if you need a very stable and bug-free version. This version maybe lacks some features... 12 | * latest: Use this folder if you want to use the latest features from the master (former nextgen) Branch... 13 | 14 | ### Instructions 15 | 1. Copy the folder with you desired stability level in a folder on your computer (or any other device where you want to run Part-DB) 16 | 2. Go to `docker-compose.yml` and replace in the line `MYSQL_ROOT_PASSWORD:` "changeme" with an unique password (without quotes). You will need this later during Part-DB setup, as the Database root password. If you want to run Part-DB on a TCP port other than 8888, then change the line `"8888:80"` under `ports` as desired. 17 | 3. Start Part-DB with the command `sudo docker-compose up -d`. This will start all required servers and runs them in background. Windows users can use the batch files `server_start.bat` and `server_stop.bat` to control the server. 18 | 4. Open a Browser and go to `localhost:8888` (or the other port you set in Step 2). You will be redirected to the Installation page of Part-DB. Choose a language and timezone, and a password for the admin user. 19 | 5. On the Database setup page, use `database` as host, `partdb` as databasenname, and `root` as username. Databasepassword is the one you put into `docker-compose.yml` in Step 2. 20 | 6. Finish the setup and make an database update, when asked. You now can use Part-DB. 21 | 7. If you want to stop the server, you can do that with `docker-compose down` or `server_stop.bat` 22 | 23 | ## Manual installation 24 | If you want to create an custom setup, you can setup the needed docker containers and their connections manually. You will need the following things: 25 | * The Part-DB image: It can be found on [Docker Hub](https://hub.docker.com/r/jbtronics/part-db/) as `jbtronics/part-db`. The tags are the same as the stability levels for the docker-compose method 26 | * A container running MariaDB/MySQL, which the Part-DB container can access. 27 | * A port forward from Port 80 in the Part-DB container, to the desired port on your host. 28 | * A volume for the Part-DB container for Part-DB's data under `:/var/www/html/data` -------------------------------------------------------------------------------- /latest/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | services: 3 | partdb: 4 | image: jbtronics/part-db:latest 5 | ports: 6 | #Replace 8888 with the port, under which Part-DB should appear 7 | - "8888:80" 8 | depends_on: 9 | - database 10 | volumes: 11 | - partdb-data:/var/www/html/data 12 | restart: always 13 | 14 | database: 15 | image: mariadb:latest 16 | volumes: 17 | - partdb-database:/var/lib/mysql 18 | environment: 19 | # Set MYSQL_ROOT_PASSWORD to a unique password!! 20 | MYSQL_ROOT_PASSWORD: changeme 21 | MYSQL_DATABASE: partdb 22 | restart: always 23 | 24 | volumes: 25 | partdb-database: 26 | partdb-data: 27 | -------------------------------------------------------------------------------- /latest/server_start.bat: -------------------------------------------------------------------------------- 1 | docker-compose up -d 2 | start "" http://localhost:8888 -------------------------------------------------------------------------------- /latest/server_stop.bat: -------------------------------------------------------------------------------- 1 | docker-compose down -------------------------------------------------------------------------------- /stable/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | services: 3 | partdb: 4 | image: jbtronics/part-db:stable 5 | ports: 6 | #Replace 8888 with the port, under which Part-DB should appear 7 | - "8888:80" 8 | depends_on: 9 | - database 10 | volumes: 11 | - partdb-data:/var/www/html/data 12 | restart: always 13 | 14 | database: 15 | image: mariadb:latest 16 | volumes: 17 | - partdb-database:/var/lib/mysql 18 | environment: 19 | # Set MYSQL_ROOT_PASSWORD to a unique password!! 20 | MYSQL_ROOT_PASSWORD: changeme 21 | MYSQL_DATABASE: partdb 22 | restart: always 23 | 24 | volumes: 25 | partdb-database: 26 | partdb-data: 27 | -------------------------------------------------------------------------------- /stable/server_start.bat: -------------------------------------------------------------------------------- 1 | docker-compose up -d 2 | start "" http://localhost:8888 -------------------------------------------------------------------------------- /stable/server_stop.bat: -------------------------------------------------------------------------------- 1 | docker-compose down --------------------------------------------------------------------------------