forked from Blasty1/tarallo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
77 lines (73 loc) · 1.88 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
70
71
72
73
74
75
76
77
---
version: '3.4'
services:
db:
image: tarallo/db
build:
context: ./
dockerfile: ./docker/db/Dockerfile
cache_from:
- tarallo/db
args:
DEVELOPMENT: ${DEVELOPMENT}
volumes:
- ./sql/database.sql:/docker-entrypoint-initdb.d/a.sql
- ./sql/database-data.sql:/docker-entrypoint-initdb.d/b.sql
- ./sql/database-procedures.sql:/docker-entrypoint-initdb.d/c.sql
- tarallo-db:/var/lib/mysql
environment:
MYSQL_ROOT_PASSWORD: root
# MYSQL_USER: tarallo
# MYSQL_PASSWORD: thisisnottheproductionpassword
MYSQL_DATABASE: tarallo
ports:
- 3307:3306
healthcheck:
test: ["CMD-SHELL", 'mariadb-admin ping']
interval: 1s
timeout: 2s
retries: 60
app:
image: tarallo/app
build:
context: ./
dockerfile: ./docker/app/Dockerfile
cache_from:
- tarallo/app
args:
XDEBUG: ${XDEBUG}
PROFILER: ${PROFILER}
DEVELOPMENT: ${DEVELOPMENT}
volumes:
# Host directories get directly mapped to server directories
# Mountpoints are created within app's Dockerfile
- ./sql:/var/www/html/sql:ro
- ./bin:/var/www/html/bin:ro
- ./public:/var/www/html/public:ro
- ./src:/var/www/html/src:ro
- ./tests:/var/www/html/tests:ro
- ./phpunit.xml:/var/www/html/phpunit.xml:ro
# Directory for xdebug profiler traces
- ./utils/xdebug:/xdebug
depends_on:
- db
web:
image: tarallo/web
build:
context: ./
dockerfile: ./docker/web/Dockerfile
cache_from:
- tarallo/web
args:
DEVELOPMENT: ${DEVELOPMENT}
ports:
- 8080:80
- 8081:81
volumes:
# Replicate volume structure of "app" but in read only
- ./src:/var/www/html/src:ro
- ./public:/var/www/html/public:ro
depends_on:
- app
volumes:
tarallo-db: