forked from dabilite/yii2-user
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
64 lines (59 loc) · 1.35 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
version: '2'
services:
## Running tests
functional-tests:
extends: codeception
entrypoint: [
"/sbin/tini",
"--",
"/bin/wait-for-it",
"-h", "$$MYSQL_HOST:3306",
"-t", "100",
"--",
"/project/tests/runtests.sh",
"run functional"
]
depends_on:
- mysql
# entrypoint: "ls /project"
## Running unit tests
unit:
extends: codeception
entrypoint: [
"/sbin/tini",
"--",
"/bin/wait-for-it",
"-h", "$$DB_HOST:3306",
"-t", "100",
"--",
"/project/tests/runtests.sh",
"run unit"
]
depends_on:
- mysql
## Running codeception helper scripts.
codeception:
tty: true
image: sammousa/php-with-extensions
entrypoint: ["/sbin/tini", "--", "/project/tests/runtests.sh"]
volumes:
- ./:/project
environment:
MYSQL_ROOT_PASSWORD: secret
MYSQL_USER: dabilite
MYSQL_PASSWORD: testpass
MYSQL_DATABASE: test
# We set this to keep compatibility between gitlab-ci and docker compose
RUNNER_IP: web
MYSQL_HOST: mysql
YII_ENV: "test"
## Mysql server (local)
mysql:
image: mysql:5.7.14
tmpfs:
- /var/lib/mysql
environment:
MYSQL_ROOT_PASSWORD: secret
MYSQL_USER: dabilite
MYSQL_PASSWORD: testpass
MYSQL_DATABASE: test