-
Notifications
You must be signed in to change notification settings - Fork 6
/
docker-compose.yml
60 lines (56 loc) · 1.5 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
version: "3.7"
services:
# Reverse proxy layer
nginx:
image: nginx:latest
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf
ports:
- 8080:80
# Web service layer
nodejs:
build:
context: backend
target: development
command: nodemon ./src/server.js
environment:
DEBUG: "database.cric:*"
ports:
- "3000:3000"
volumes:
- "./backend:/opt/cric/backend"
# Anonymous volume to avoid overwritten by the mounting of the host directory at runtime.
- "/opt/cric/backend/node_modules"
# Data persistence service layer
db:
image: mysql:8.0
volumes:
- "db_data:/var/lib/mysql"
ports:
- "3306:3306"
env_file:
- ./mysql.dev.env
- ./mysql.prod.env
# Application service layer
angular:
build:
context: frontend
target: development
# Need to tell the built in development server to bind to the unspecified IP address.
# In IPv4 that address is 0.0.0.0.
# Otherwise, you will have "Connection reset by peer"
command: npm run start-dev
environment:
# Development values
CRIC_DOMAIN: "http://localhost:8080"
CRIC_API_DOMAIN: "http://localhost:8080"
CRIC_EMAIL: "[email protected]"
CRIC_PLAYGROUND: "false"
ports:
- "4200:4200"
volumes:
- "./frontend:/opt/cric/frontend"
# Anonymous volume to avoid overwritten by the mounting of the host directory at runtime.
- "/opt/cric/frontend/node_modules"
volumes:
db_data: