-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.prod
48 lines (47 loc) · 942 Bytes
/
docker-compose.prod
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
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'
- '/usr/src/app/node_modules'
ports:
- '9000:9000'
command: ["npm", "start"]
nginx:
build:
context: .
dockerfile: ./nginx/Dockerfile
environment:
- NODE_ENV
depends_on:
- cooper-backend
- cooper-database-api
ports:
- 3000:80