DEV Community

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

Collapse
 
nicolasbonnici profile image
Nicolas Bonnici • Edited

Hey there,

Yup this is an old post must write a "How to build a clean Docker Symfony 6.2 PHP8.1 PostgreSQL 14 Nginx project" post ;)

  • Not according to docker-compose documentation docs.docker.com/compose/compose-fi...

  • Storing error logs under a container is a bad practice. You need to store them outside containers like so or somewhere else like an external service

nginx:
container_name: nginx
build:
context: ./nginx
volumes:
- ./../symfony/:/var/www
- ./nginx/nginx.conf:/etc/nginx/nginx.conf
- ./nginx/sites/:/etc/nginx/sites-available
- ./nginx/conf.d/:/etc/nginx/conf.d
- ./logs:/var/log
depends_on:
- php-fpm
ports:
- "8080:80"
- "443:443"

  • Good if it's working, i usually use "pdo_pgsql" no problem with it

Stay tune but the version used here are clearly outdated.