-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
51 lines (47 loc) · 986 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
version: '3.8'
services:
front-end:
container_name: front-end
build:
context: ./front-end
dockerfile: Dockerfile
ports:
- "3000:3000"
volumes:
- ./front-end/src:/app/src
environment:
- NODE_ENV=production
depends_on:
- database
back-end:
container_name: back-end
build:
context: ./back-end
dockerfile: Dockerfile
ports:
- "127.0.0.1:5000:5000"
volumes:
- ./back-end/src:/app
env_file:
- ./.env
depends_on:
- database
database:
container_name: database
build:
context: ./database
dockerfile: Dockerfile
restart: unless-stopped
env_file:
- ./.env
environment:
MYSQL_USER: ${SQL_USER}
MYSQL_PASSWORD: ${SQL_PASSWORD}
MYSQL_ROOT_PASSWORD: ${SQL_PASSWORD}
MYSQL_DATABASE: ${SQL_DATABASE}
ports:
- "127.0.0.1:3306:3306"
volumes:
- mysql-data:/var/lib/mysql
volumes:
mysql-data: