-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
50 lines (49 loc) · 1.05 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
version: '3'
volumes:
dbdata:
services:
cooper-mysql:
image: mysql:latest
volumes:
- dbdata:/var/lib/mysql
restart: always
environment:
- MYSQL_ROOT_PASSWORD=root
- MYSQL_DATABASE=cooper
- MYSQL_PASSWORD=root
ports:
- '3306:3306'
cooper-database-api:
build:
context: ./database
dockerfile: Dockerfile
depends_on:
- cooper-mysql
env_file:
- database/.env
ports:
- '5000:8080'
cooper-backend:
container_name: cooper-backend
build:
context: ./backend
dockerfile: Dockerfile
volumes:
- './backend/:/usr/src/app:cached'
- '/usr/src/app/node_modules'
ports:
- '9000:9000'
command: ["npm", "run", "watch"]
cooper-frontend:
container_name: cooper-frontend
build:
context: ./frontend
dockerfile: Dockerfile
volumes:
- './frontend/:/usr/src/app:cached'
- '/usr/src/app/node_modules'
ports:
- '3000:3000'
environment:
- NODE_ENV=development
command: ["npm", "run", "start"]