forked from damianopetrungaro/laravelday2019
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
43 lines (39 loc) · 848 Bytes
/
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
version: '2.1'
services:
server:
restart: on-failure
entrypoint: php artisan serve --host=0.0.0.0
build:
context: .
ports:
- 8000:8000
env_file:
- .env
depends_on:
mysql:
condition: service_healthy
migrations:
build:
context: .
entrypoint: bash -c "php artisan migrate && php artisan db:seed"
depends_on:
mysql:
condition: service_healthy
env_file:
- .env
mysql:
image: mysql:5.7.26
ports:
- 3306:3306
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: laravel
MYSQL_USER: user
MYSQL_PASSWORD: root
volumes:
- ./data/mysql:/var/lib/mysql
healthcheck:
test: ["CMD", "mysql", "-uuser", "-proot", "laravel", "-e", "exit"]
interval: 10s
timeout: 5s
retries: 5