-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
52 lines (49 loc) · 1.25 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
version: '3.7'
services:
db:
image: mysql:5
container_name: bzstu_db
command: --default-authentication-plugin=mysql_native_password
restart: always
ports:
- "3306:3306"
volumes:
- ./docker/db:/var/lib/mysql
env_file:
- .env
php:
build: ./docker/php
container_name: bzstu_php
ports:
- "9000:9000"
volumes:
- .:/var/www
entrypoint: ["sh", "-c"]
command: ["composer install && php-fpm"]
working_dir: /var/www
links:
- db
nginx:
image: nginx:latest
container_name: bzstu_ngnix
ports:
- "80:80"
volumes:
- .:/var/www
- ./docker/nginx/conf.d:/etc/nginx/conf.d:ro
- ./docker/nginx/logs:/var/log/nginx
links:
- php
node:
image: node:15.1.0-alpine3.12
container_name: bzstu_node
ports:
- "3000:3000"
working_dir: /var/www
env_file:
- .env
entrypoint: ["sh", "-c"]
command: ["yarn install --production"]
volumes:
- .:/var/www
- ./node_modules:/var/www/node_modules