DEV Community

Discussion on: How to build a clean Docker Symfony 5.2 PHP8 PostgreSQL Nginx project

Collapse
 
mmarton profile image
mmarton

Hi!

Nice article, just a few notes/questions:

  1. you named the nginix config file Dockerfile
  2. it was a bit misleading that you called your working directory src. At first i thought you only mapped the symfony's src folder into the php container.
  3. You map the whole project with vendor and possible node_modules into 2 containers. Wouldn't it be enough just to map the public dir to the nginx?
  4. what is the performance of the config above,

M

Collapse
 
nicolasbonnici profile image
Nicolas Bonnici

Hey there,

Nope the actual ./docker/nginx/Dockerfile is a very simple docker container build conf from nginx:alpine image.

I totally agree with you, i should rename this folder something like symfony for instance, you can submit a pull request if you want to.

Nope actually no use of npm, and composer vendors directory his located under the folder the actual ./src folder.

These is a development stack, not optimized or production ready, but the build time is very honorable.