-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
115 lines (107 loc) · 2.19 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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
version: '3'
services:
frontend-nginx:
build:
context: ./frontend/docker
dockerfile: nginx.docker
volumes:
- ./frontend:/var/www/frontend
depends_on:
- api-php-fpm
restart: always
ports:
- "8091:80"
networks:
- youtube
frontend-nodejs:
image: node:10.11-jessie
volumes:
- ./frontend:/var/www/frontend
restart: always
working_dir: /var/www/frontend
tty: true
networks:
- youtube
api-nginx:
build:
context: ./api/docker
dockerfile: nginx.docker
volumes:
- ./api:/var/www/api
restart: always
ports:
- "8092:80"
networks:
- youtube
api-nodejs:
image: node:10.14-alpine
volumes:
- ./api:/var/www/api
restart: always
working_dir: /var/www/api
tty: true
networks:
- youtube
api-php-fpm:
build:
context: ./api/docker
dockerfile: php-fpm.docker
volumes:
- ./api:/var/www/api
- ./storage:/var/www/storage
depends_on:
- api-mysql
- api-redis
restart: always
environment:
- "DB_PORT=3306"
- "DB_HOST=api-mysql"
- "REDIS_PORT=6379"
- "REDIS_HOST=api-redis"
networks:
- youtube
api-php-cli:
build:
context: ./api/docker
dockerfile: php-cli.docker
volumes:
- ./api:/var/www/api
- ./api/storage:/var/www/api/storage
depends_on:
- api-mysql
- api-redis
restart: always
environment:
- "DB_PORT=3306"
- "DB_HOST=api-mysql"
- "REDIS_PORT=6379"
- "REDIS_HOST=api-redis"
working_dir: /var/www/api
tty: true
networks:
- youtube
api-mysql:
image: mysql
restart: always
command: ["--default-authentication-plugin=mysql_native_password"]
volumes:
- ./api/storage/docker/mysql:/var/lib/mysql
environment:
- "MYSQL_ROOT_PASSWORD=357968"
- "MYSQL_USER=app"
- "MYSQL_PASSWORD=secret"
- "MYSQL_DATABASE=youtube"
ports:
- "33063:3306"
networks:
- youtube
api-redis:
image: redis:3.0
restart: always
ports:
- "63796:6379"
networks:
- youtube
networks:
youtube:
driver: bridge