-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
62 lines (57 loc) · 1.42 KB
/
docker-compose.yaml
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
version: '3.4'
services:
app:
build:
context: .
target: quotes_database_php
volumes:
# Comment out the next line in production
- ./:/srv/app:rw,cached
# If you develop on Linux, comment out the following volumes to just use bind-mounted project directory from host
- /srv/app/var/
- /srv/app/var/cache/
- /srv/app/var/logs/
- /srv/app/var/sessions/
environment:
- SYMFONY_VERSION
nginx:
build:
context: .
target: quotes_database_nginx
depends_on:
- app
volumes:
# Comment out the next line in production
- ./docker/nginx/conf.d:/etc/nginx/conf.d:ro
- ./public:/srv/app/public:ro
ports:
- '80:80'
# This HTTP/2 proxy is not secure: it should only be used in dev
h2-proxy:
build:
context: .
target: quotes_database_h2-proxy
depends_on:
- nginx
volumes:
- ./docker/h2-proxy/default.conf:/etc/nginx/conf.d/default.conf:ro
ports:
- '443:443'
db:
image: mysql:5.7
volumes:
- ./docker/db_data:/var/lib/mysql
environment:
MYSQL_ROOT_PASSWORD: test123
MYSQL_DATABASE: qdb
MYSQL_USER: qdb
MYSQL_PASSWORD: test
ports:
- '3306:3306'
yarn:
image: node:10-alpine
user: "1000:1000"
volumes:
- .:/app
command: sh -c "yarn install --frozen-lockfile && yarn dev --watch"
working_dir: /app