Skip to content

Instantly share code, notes, and snippets.

@EdouardCourty
Created June 11, 2022 18:16
Show Gist options
  • Save EdouardCourty/b069f8606ac1de131f2b23e910de1ef5 to your computer and use it in GitHub Desktop.
Save EdouardCourty/b069f8606ac1de131f2b23e910de1ef5 to your computer and use it in GitHub Desktop.
EdouardCourty/symfony-docker/docker-compose.yml
version: '3.9'
services:
server:
build: .
container_name: 'project_server'
depends_on:
- database
networks:
- project-network
volumes:
- .:/var/www/project
proxy:
image: nginx:1.9.15-alpine
container_name: 'project_proxy'
ports:
- target: 80
published: 8080
protocol: tcp
volumes:
- ./docker/nginx:/etc/nginx/conf.d
- ./public:/var/www/project
networks:
- project-network
depends_on:
- server
- database
database:
image: postgres:14.2-alpine
container_name: 'project_database'
environment:
- POSTGRES_DB=main_dev
- POSTGRES_PASSWORD=app
- POSTGRES_USER=app
ports:
- target: 5432
published: 5432
protocol: tcp
networks:
- project-network
volumes:
- database:/var/lib/postgresql/data
networks:
project-network:
driver: bridge
volumes:
database:
driver: local
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment