Skip to content

Instantly share code, notes, and snippets.

@EdouardCourty
Last active June 11, 2022 21:02
Show Gist options
  • Save EdouardCourty/15744d73a54289e4dc336b3a2177c4fd to your computer and use it in GitHub Desktop.
Save EdouardCourty/15744d73a54289e4dc336b3a2177c4fd 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
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
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
volumes:
- database:/var/lib/postgresql/data
volumes:
database:
driver: local
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment