secure-77 / Perlite

A web-based markdown viewer optimized for Obsidian
https://perlite.secure77.de/
MIT License
1.06k stars 92 forks source link

Why two containers? #139

Open marvinlwenzel opened 1 week ago

marvinlwenzel commented 1 week ago

Hello.

Great project and thanks for the work.

Question: Why does the docker rollout use two containers, instead of a single one?

Context: I would like to roll out perlite, but I have a likely rather exotic landscape based on podman - not docker. Be it due to skill issues on my end, or lacking feature parity between podman and docker, I am having trouble getting it to work. This is likely due to the fpm/nginx separation. Right now I am fiddling on an own image combining both.

Thanks alot.

secure-77 commented 1 week ago

Hey, thanks for the feedback!

The main reason is that there is no official maintained base image for php and nginx in one image. So, I am using separate base images from official php and nginx. Also, it is more or less common and best practices to split different processes in different containers. See: https://docs.docker.com/build/building/best-practices/#decouple-applications

Im not familiar with podman, but you can always use a small Ubuntu as base image and then install php fpm and a web server. See also this issue for more info: https://github.com/secure-77/Perlite/issues/100