forked from codeedu/docker-laravel-cd
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
62 lines (56 loc) · 1.32 KB
/
docker-compose.yaml
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
version: '3'
services:
app:
build: .
container_name: app
entrypoint: dockerize -template ./.docker/app/.env:.env -wait tcp://db:3306 -timeout 40s ./.docker/entrypoint.sh
environment:
- DB_HOST=db
- DB_DATABASE=laravel
- DB_USERNAME=root
- DB_PASSWORD=root
volumes:
- .:/var/www
networks:
- app-network
depends_on:
- db
- redis
nginx:
build: .docker/nginx
container_name: nginx
restart: always
tty: true
ports:
- "8000:80"
volumes:
- .:/var/www
networks:
- app-network
depends_on:
- app
db:
image: mysql:5.7
command: --innodb-use-native-aio=0
container_name: db
restart: always
tty: true
ports:
- "33006:3306"
volumes:
- ./.docker/dbdata:/var/lib/mysql
environment:
- MYSQL_DATABASE=laravel
- MYSQL_ROOT_PASSWORD=root
- MYSQL_USER=root
networks:
- app-network
redis:
image: redis:alpine
expose:
- 6379
networks:
- app-network
networks:
app-network:
driver: bridge