-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
69 lines (63 loc) · 1.39 KB
/
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
version: '3.6'
x-cache-from:
- &app-cache-from
cache_from:
- ${NGINX_IMAGE:-iw/nginx}
- ${PHP_IMAGE:-iw/php}
- &node-cache-from
cache_from:
- ${NODE_IMAGE:-iw/node}
services:
db:
image: postgres:9.6-alpine
environment:
- POSTGRES_DB=db
- POSTGRES_USER=user
- POSTGRES_PASSWORD=pwd
volumes:
- db-data:/var/lib/postgresql/data:rw
ports:
- '5432:5432'
php:
image: ${PHP_IMAGE:-iw/php}
depends_on:
- db
build:
context: app
target: app_php
<<: *app-cache-from
volumes:
- ./app:/srv/app:rw
- ./app/docker/php/conf.d/api-platform.dev.ini/:/usr/local/etc/php/conf.d/api-platform.ini
#- app-front:/srv/app/public/build
- app-sf-cache:/srv/app/var
node:
image: ${NODE_IMAGE:-iw/node}
build:
context: app
dockerfile: app/Dockerfile.node
<<: *node-cache-from
command: sh -c "yarn install; yarn watch"
working_dir: /home/node/app
depends_on:
- php
volumes:
- ./app:/home/node/app
nginx:
image: ${NGINX_IMAGE:-iw/nginx}
build:
context: app
target: app_nginx
<<: *app-cache-from
depends_on:
- php
- node
volumes:
- ./app/public:/srv/app/public:ro
#- app-front:/srv/app/public/build:ro
ports:
- "8082:80"
volumes:
db-data: {}
app-sf-cache: {}
app-front: {}