-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
96 lines (88 loc) · 2.38 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
version: '3.9'
services:
nginx:
image: nginx:latest
container_name: nginx
ports:
- '8080:80'
volumes:
- ./public:/var/www/html/public
- ./docker/nginx/default.conf:/etc/nginx/conf.d/default.conf
links:
- php
php:
build: ./docker/php
container_name: php
environment:
CONTAINER_ROLE: app
depends_on:
mysql:
condition: service_healthy
volumes:
- .:/var/www/html
php-test:
build: ./docker/php
container_name: php-test
environment:
CONTAINER_ROLE: app
depends_on:
mysql-test:
condition: service_healthy
volumes:
- .:/var/www/html
scheduler:
build: ./docker/php
container_name: scheduler
environment:
CONTAINER_ROLE: scheduler
depends_on:
mysql:
condition: service_healthy
volumes:
- .:/var/www/html
worker:
build: ./docker/php
container_name: worker
environment:
CONTAINER_ROLE: worker
depends_on:
mysql:
condition: service_healthy
volumes:
- .:/var/www/html
mysql:
image: 'mysql:8.0'
container_name: mysql
ports:
- '3366:3306'
environment:
MYSQL_ROOT_PASSWORD: 'procuros'
MYSQL_DATABASE: 'procuros'
MYSQL_USER: 'procuros'
MYSQL_PASSWORD: 'procuros'
healthcheck:
test: ['CMD', 'mysqladmin', 'ping', '-pprocuros']
retries: 3
timeout: 5s
volumes:
- 'database:/var/lib/mysql'
- ./docker/mysql/mysql.cnf:/etc/alternatives/my.cnf:ro
mysql-test:
image: 'mysql:8.0'
container_name: mysql-test
ports:
- '3344:3306'
environment:
MYSQL_ROOT_PASSWORD: 'procuros'
MYSQL_DATABASE: 'procuros'
MYSQL_USER: 'procuros'
MYSQL_PASSWORD: 'procuros'
healthcheck:
test: ['CMD', 'mysqladmin', 'ping', '-pprocuros']
retries: 3
timeout: 5s
volumes:
- ./docker/mysql/mysql.cnf:/etc/alternatives/my.cnf:ro
volumes:
database:
driver: local