-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
80 lines (74 loc) · 1.69 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
version: "3"
services:
app:
build: .
container_name: codeflix-video-app
entrypoint: ./.docker/entrypoint.sh
ports:
- "9000"
- "3000:3000"
- "35729:35729"
environment:
- _DB_HOST=db
- _DB_DATABASE=codeflix_videos
- _DB_USERNAME=root
- _DB_PASSWORD=root
- _TEST_DB_DATABASE=codeflix_videos_test
- CHOKIDAR_USELLING=true
volumes:
- .:/var/www
- ./.docker/php/log:/var/log:rw,cached
depends_on:
- db
- redis
networks:
- app-network
nginx:
build: ./.docker/nginx
container_name: codeflix-video-nginx
entrypoint: ./.docker/nginx/entrypoint.sh
restart: always
tty: true
ports:
- "8000:80"
environment:
- NGINX_HOST=app
- NGINX_PORT=9000
volumes:
- .:/var/www
- ./.docker/nginx/log:/var/log/nginx:rw,cached
depends_on:
- app
networks:
- app-network
db:
image: mysql:5.7
command: --innodb-use-native-aio=0
container_name: codeflix-videos-db
tty: true
restart: always
ports:
- "3306:3306"
environment:
- MYSQL_USER=root
- MYSQL_ROOT_PASSWORD=root
volumes:
- ./.docker/database/dumps:/dumps:rw,cached
- ./.docker/database/data:/var/lib/mysql:rw,cached
- ./.docker/database/config:/etc/mysql/conf.d:rw,cached
- ./.docker/database/config:/docker-entrypoint-initdb.d
networks:
- app-network
redis:
image: redis:alpine
container_name: codeflix-video-redis
restart: always
ports:
- "6379:6379"
volumes:
- ./.docker/redis:/data:rw,cached
networks:
- app-network
networks:
app-network:
driver: bridge