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"
Stay tune but the version used here are clearly outdated.
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
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"
Stay tune but the version used here are clearly outdated.