-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
68 lines (61 loc) · 1.41 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
version: "3.8"
services:
# PHP
php:
build: .docker/php
container_name: mitsuBp_php
ports:
- 5173:5173
volumes:
- .:/var/www:cached
depends_on:
- db
networks:
- my_network
# Nginx
nginx:
image: nginx
container_name: mitsuBp_nginx
ports:
- 80:80
volumes:
- .:/var/www
- .docker/nginx/default.conf:/etc/nginx/conf.d/default.conf
- .docker/nginx/nginx.conf:/etc/nginx/nginx.conf
depends_on:
- php
- npm
networks:
- my_network
# DATABASE (MySQL)
db:
image: mysql:8.0.19
platform: linux/x86_64
container_name: mysql_mitsuBP
command: --default-authentication-plugin=mysql_native_password
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: BPCOLORDB
MYSQL_USER: HanThamarat
MYSQL_PASSWORD: root
ports:
- "3307:3306"
volumes:
- "./.docker/db:/var/lib/mysql:rw"
networks:
- my_network
npm:
image: node:current-alpine
container_name: mitsuBp_npm
volumes:
- .:/var/www
entrypoint: ["npm", "run", "dev"]
working_dir: /var/www
networks:
- my_network
networks:
my_network:
driver: bridge
volumes:
mysql_data:
driver: local