Part-DB / Part-DB-legacy

[LEGACY Version] Open Source Electronic Parts Database using PHP and MySQL
GNU General Public License v2.0
158 stars 35 forks source link

Dockerize and add docker-compose file #28

Closed schulzh closed 6 years ago

schulzh commented 6 years ago

Related: https://github.com/Part-DB/Part-DB/issues/14

This PR adds a Dockerfile to build a docker image of PartDB itself and a docker-compose file to bring up a PartDB server complete with database.

The Dockerfile is based on php:7-apache. While I could not get this to work on the nextgen branch (the database schema seems to have problems), I have successfully tested it on the v0.4.6 tag.

The docker-compose.yml uses MariaDB as database. When configuring PartDB for the first time, configure the database as follows:

jbtronics commented 6 years ago

Thank you, docker is a Thing that i wanted to implement since a longer time...

I will Test your PR in the next days and merge it when it works...

maxholgasson commented 6 years ago

bildschirmfoto 2018-08-25 um 14 42 57 is that docker thing already available and is there anywhere an instruction? would like to install it to my synology nas and found a version but get an error when trying to instal it

jbtronics commented 6 years ago

@schulzh Your pull request works great, Thank you very much.

The Part-DB container is now available in Docker Hub (https://hub.docker.com/r/jbtronics/part-db/), too.

Using that i created a new repo where you can find the docker-composer files, so you can easily create a running Part-DB instance using docker (https://github.com/Part-DB/Part-DB-docker).

@maxholgasson In this repo is also a tutorial how to install Part-DB using docker, maybe this helps you.

maxholgasson commented 6 years ago

Hi thanks! I tried it installing it with your link https://hub.docker.com/r/jbtronics/part-db/ and it finds the two versions -stable and -latest. However it tries registering it and fails without any warning.

jbtronics commented 6 years ago

If it is possible on your NAS i would recommend to use docker-compose...

You could try to not to use the whole URL, But instead only "jbtronics/part-db" or "jbtronics/part-db:latest"...