andi34 / photobooth

A Photobooth web interface for Linux and Windows.
MIT License
71 stars 39 forks source link

Add a Docker Setup #397

Closed mhellmeier closed 2 years ago

mhellmeier commented 2 years ago

Prerequisites checklist

What is the purpose of this pull request? (put an "x" next to an item)

What changes did you make? (Give an overview)

Add a docker setup for local testing and development to fix #396.

Is there anything you'd like reviewers to focus on?

No.

andi34 commented 2 years ago

There was a docker file added for review in the past, but I am not familiar with docker to be true. https://github.com/andreknieriem/photobooth/pull/180

mhellmeier commented 2 years ago

I also checked that Dockerfile. It builds everything from scratch by using the debian:buster-slim image. In my opinion, that's too complicated because other developers created scripts for that. Therefore, I used the webdevops/php-nginx image that comes with a pre-build nginx server and PHP installed to reduce the maintenance overhead.

If you aren't familiar with docker you can have a look at the commands used in the Dockerfile. I got them from the current installation script and the wiki.

I tested the whole setup and it works pretty well! I would be very happy to see it merged in the current dev branch.

If you want to test it on your machine:

  1. Install docker
  2. Install docker-compose
  3. Open a terminal in the project directory and execute docker-compose up --build
  4. That's it! Visit localhost:8080 in a browser and it should show the Photobooth application!