-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathdocker-compose.test.yml
48 lines (44 loc) · 1.08 KB
/
docker-compose.test.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
version: '2'
services:
postgres_test:
image: postgres:alpine
volumes:
- postgres_data:/var/lib/postgresql/data
environment:
POSTGRES_USER: "${TEST_DB_USERNAME}"
POSTGRES_PASSWORD: "${TEST_DB_USERNAME}"
vol_app_source:
image: tianon/true
volumes:
- ./:/app
codeception:
build:
context: ./yiidock/workspace
dockerfile: "Dockerfile-${PHP_VERSION}"
volumes_from:
- vol_app_source
depends_on:
- postgres_test
entrypoint: ["vendor/bin/codecept"]
working_dir: /app
environment:
DB_DSN: "${TEST_DB_DSN}"
DB_USERNAME: "${TEST_DB_USERNAME}"
DB_PASSWORD: "${TEST_DB_PASSWORD}"
yii_test:
build:
context: ./yiidock/workspace
dockerfile: "Dockerfile-${PHP_VERSION}"
volumes_from:
- vol_app_source
depends_on:
- postgres_test
entrypoint: ["php", "yii_test"]
environment:
DB_DSN: "${TEST_DB_DSN}"
DB_USERNAME: "${TEST_DB_USERNAME}"
DB_PASSWORD: "${TEST_DB_PASSWORD}"
volumes:
postgres_data:
external:
name: test_postgres_data