-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathdocker-compose.yml
95 lines (88 loc) · 1.88 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
# This file is used for production, not for development!
version: "3.4"
services:
nginx:
container_name: course-nginx
build:
context: ./prod-support/nginx
dockerfile: ./Dockerfile
ports:
- "3000:80"
networks:
- course
- nginx
depends_on:
- course-frontend
- course-backend
- course-distribute-server
links:
- course-frontend
- course-backend
course-frontend:
container_name: course-frontend
build:
context: .
dockerfile: ./prod-support/frontend/Dockerfile
# ports:
# - "3000:3000"
expose:
- "3000"
networks:
- course
environment:
- REACT_APP_API_HOST=course-backend
links:
- course-backend
course-backend:
container_name: course-backend
build:
context: .
dockerfile: ./prod-support/backend/Dockerfile
expose:
- "8000"
networks:
- course
depends_on:
- course-mongodb
- course-redisdb
environment:
- DISTRIBUTE_SERVER_HOST=course-distribute-server
- DISTRIBUTE_SERVER_PORT=8001
- MONGO_HOST=course-mongodb
- REDIS_HOST=course-redisdb
links:
- course-distribute-server
course-mongodb:
container_name: course-mongo
image: mongo
environment:
- MONGO_INITDB_ROOT_USERNAME=eeinfo
- MONGO_INITDB_ROOT_PASSWORD=R9ujPAQBk4X2fdkv
expose:
- "27017"
networks:
- course
volumes:
- course-mongo-data:/data/db
course-redisdb:
container_name: course-redis
image: redis
expose:
- "6379"
networks:
- course
course-distribute-server:
container_name: course-distribute
build:
context: .
dockerfile: ./prod-support/distribute-server/Dockerfile
expose:
- "8001"
networks:
- course
networks:
nginx:
external: true
course:
volumes:
course-mongo-data: