forked from Cap-Coding/symfony_docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
50 lines (46 loc) · 989 Bytes
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
version: '3.8'
services:
postgres:
image: postgres:12.4-alpine
restart: on-failure
environment:
POSTGRES_DB: test
POSTGRES_USER: sf_user
POSTGRES_PASSWORD: random_password
PGDATA: /var/lib/postgresql/data
volumes:
- db-data:/var/lib/postgresql/data:rw
ports:
- "5432:5432"
php:
build:
context: .
target: app_php
image: sf-docker/php:dev
restart: on-failure
environment:
APP_ENV: dev
APP_DEBUG: 1
PHP_DATE_TIMEZONE: ${PHP_DATE_TIMEZONE:-UTC}
XDEBUG_CONFIG: remote_host=docker.for.mac.localhost
PHP_IDE_CONFIG: serverName=localhost
depends_on:
- postgres
volumes:
- .:/app:rw,cached
- var:/app/var
nginx:
build:
context: .
target: app_nginx
image: sf-docker/nginx:dev
restart: on-failure
depends_on:
- php
volumes:
- ./public:/app/public:ro
ports:
- "8080:80"
volumes:
db-data:
var: