-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
53 lines (47 loc) · 971 Bytes
/
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'
services:
react:
container_name: react
build:
context: react/
dockerfile: Dockerfile
volumes:
- './react:/app'
ports:
- 80:80
depends_on:
- nodejs
nodejs:
container_name: nodejs
build:
context: nodejs/
dockerfile: Dockerfile
environment:
- MYSQL_DATABASE=${MYSQL_DATABASE}
- MYSQL_PASSWORD=${MYSQL_PASSWORD}
- MYSQL_HOST=${MYSQL_HOST}
- MYSQL_USER=${MYSQL_USER}
volumes:
- './nodejs:/app'
- '/app/node_modules'
ports:
- 4000:4000
expose:
- 4000
depends_on:
- dbmysql
dbmysql:
image: mysql:5.7
container_name: dbmysql
environment:
- MYSQL_DATABASE=${MYSQL_DATABASE}
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
ports:
- 3306:3306
expose:
- 3306
volumes:
- my-db:/var/lib/mysql
- ./mysql:/docker-entrypoint-initdb.d/:rw
volumes:
my-db: