forked from lakasir/lakasir
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
72 lines (67 loc) · 1.5 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
version: '3'
networks:
laravel:
services:
nginx:
image: nginx:stable-alpine
container_name: nginx
depends_on:
- app
ports:
- 8888:80
volumes:
- ./:/var/www/html:cached
- ./nginx/default.conf:/etc/nginx/conf.d/default.conf
- ./nginx:/var/log/nginx
networks:
- laravel
mysql:
image: mysql:5.7.29
container_name: mysql
restart: unless-stopped
tty: true
ports:
- 3308:3306
environment:
MYSQL_DATABASE: ${DB_DATABASE}
MYSQL_USER: ${DB_USERNAME}
MYSQL_PASSWORD: ${DB_PASSWORD}
MYSQL_ROOT_PASSWORD: ${DB_PASSWORD}
SERVICE_TAGS: dev
SERVICE_NAME: mysql
networks:
- laravel
redis:
image: redis:alpine
container_name: redis
ports:
- 6363:6379
command: redis-server --requirepass ${REDIS_PASSWORD}
environment:
- REDIS_REPLICATION_MODE=master
networks:
- laravel
app:
build:
context: .
dockerfile: Dockerfile
container_name: app
depends_on:
- mysql
- redis
volumes:
- ./:/var/www/html:cached
- ./php/local.ini:/usr/local/etc/php/conf.d/local.ini
- ./php/www.conf:/usr/local/etc/php-fpm.d/www.conf
ports:
- 9000:9000
command: >
sh -c 'composer install --ignore-platform-reqs
&& yarn install
&& yarn run dev
&& php artisan migrate
&& php artisan key:generate
&& chmod 777 -R /var/www/html/storage/
&& php-fpm'
networks:
- laravel