-
Notifications
You must be signed in to change notification settings - Fork 70
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
69 lines (65 loc) · 1.48 KB
/
docker-compose.yml
File metadata and controls
69 lines (65 loc) · 1.48 KB
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
services:
app:
build: .
image: lada-cache-app:latest
container_name: lada-cache-app
working_dir: /var/www
volumes:
- .:/var/www
environment:
- REDIS_HOST=redis
depends_on:
- redis
command: >
bash -lc "set -e; vendor/bin/phpunit --configuration phpunit.xml --coverage-clover coverage.xml"
networks:
- main
redis:
image: redis:7-alpine
container_name: lada-cache-redis
ports:
- "6379:6379"
networks:
- main
mysql:
image: mysql:8.0
container_name: lada-cache-mysql
environment:
MYSQL_DATABASE: test
MYSQL_ROOT_PASSWORD: secret
ports:
- "3306:3306"
healthcheck:
test: ["CMD-SHELL", "mysqladmin ping -h localhost -uroot -psecret --silent"]
interval: 5s
timeout: 5s
retries: 20
networks:
- main
app-mysql:
build: .
image: lada-cache-app:latest
container_name: lada-cache-app-mysql
working_dir: /var/www
volumes:
- .:/var/www
environment:
- REDIS_HOST=redis
- DB_CONNECTION=mysql
- DB_HOST=mysql
- DB_PORT=3306
- DB_DATABASE=test
- DB_USERNAME=root
- DB_PASSWORD=secret
depends_on:
mysql:
condition: service_healthy
redis:
condition: service_started
command: >
bash -lc "set -e; vendor/bin/phpunit --configuration phpunit.xml --coverage-clover coverage-mysql.xml"
networks:
- main
networks:
main:
driver: bridge