-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yml
131 lines (128 loc) · 2.59 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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
services:
data:
image: silintl/data-volume:latest
container_name: data
volumes:
- ./application:/data
db:
image: mariadb:10
container_name: db
ports:
- "3306:3306"
environment:
MYSQL_ROOT_PASSWORD: r00tp@ss!
MYSQL_DATABASE: appbuilder
MYSQL_USER: appbuilder
MYSQL_PASSWORD: appbuilder
adminer:
image: adminer
container_name: db-adminer
restart: always
ports:
- "19080:8080"
links:
- db:db.docker
testDb:
image: mariadb:10
container_name: testDb
ports:
- "3306"
environment:
MYSQL_ROOT_PASSWORD: r00tp@ss!
MYSQL_DATABASE: test
MYSQL_USER: appbuilder
MYSQL_PASSWORD: appbuilder
web:
build: .
container_name: web
volumes_from:
- data
ports:
- "80:80"
links:
- db
env_file:
- ./common.env
- ./local.env
cron:
build: .
container_name: cron
volumes_from:
- data
links:
- db
- testDb
env_file:
- ./common.env
- ./local.env
command: /data/run-cron.sh
composer:
build: .
container_name: composer
volumes_from:
- data
env_file:
- ./local.env
working_dir: /data
command: composer install --prefer-dist
cli:
build: .
container_name: cli
volumes_from:
- data
volumes:
- /tmp:/composer
links:
- db
- testDb
working_dir: /data
user: "${DOCKER_UIDGID}"
env_file:
- ./common.env
- ./local.env
command: ["true"]
yiimigrate:
build: .
container_name: yiimigrate
user: "${DOCKER_UIDGID}"
volumes_from:
- data
links:
- db
env_file:
- ./common.env
- ./local.env
working_dir: /data
command: bash -c "whenavail db 3306 100 ./yii migrate --interactive=0 && ./rebuildbasemodels.sh"
yiimigratetestdb:
build: .
container_name: yiimigratetestDb
volumes_from:
- data
links:
- testDb
env_file:
- ./common.env
- ./local.env
working_dir: /data
command: whenavail testDb 3306 100 ./yii migrate --interactive=0
environment:
MYSQL_HOST: testDb
MYSQL_DATABASE: test
codecept:
build: .
container_name: codecept
volumes_from:
- data
links:
- testDb
- yiimigratetestdb
env_file:
- ./common.env
- ./local.env
working_dir: /data
entrypoint: whenavail testDb 3306 100 codecept
command: run unit
environment:
MYSQL_HOST: testDb
MYSQL_DATABASE: test