-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
74 lines (69 loc) · 1.85 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
version: '3'
networks:
laravel:
services:
nginx:
image: library/nginx:stable-alpine
container_name: nginx
volumes:
- ./src/app:/var/www/html
- ./nginx/default.conf:/etc/nginx/conf.d/default.conf
ports :
- "8060:80"
depends_on:
- php
- mysql
networks :
- laravel
mysql:
image: library/mysql:5.7.22
container_name: mysql
restart: unless-stopped
ports :
- "3306:3306"
volumes:
- ./mysql:/var/lib/mysql
environment:
MYSQL_DATABASE: task
MYSQL_USER: root
MYSQL_PASSWORD : root
MYSQL_ROOT_PASSWORD: root
SERVICE_TAGs: dev
SERVICE_NAME: mysql
networks :
- laravel
mysql_test:
image: library/mysql:5.7.22
container_name: mysql_test
restart: unless-stopped
ports :
- "3307:3306"
volumes:
- ./mysql_test:/var/lib/mysql
environment:
MYSQL_DATABASE: task_test
MYSQL_USER: root
MYSQL_PASSWORD : root
MYSQL_ROOT_PASSWORD: root
SERVICE_TAGs: dev
SERVICE_NAME: mysql_test
networks :
- laravel
php:
build:
context: .
dockerfile: Dockerfile
container_name: php
volumes:
- ./src/app:/var/www/html
ports :
- "9000:9000"
networks :
- laravel
command: >
sh -c "composer install &&
cp .env.example .env &&
php artisan key:generate &&
php artisan migrate:fresh --seed &&
php artisan jwt:secret &&
php-fpm"