forked from akhilsuseelan1996/freeCodeCamp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
107 lines (106 loc) · 3.27 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
96
97
98
99
100
101
102
103
104
105
106
107
# Docker Compose file for FreeCodeCamp
#
# If using Docker Toolbox, set `DOCKER_HOST_LOCATION` env var to output from
# `docker-machine ip`
#
# Bootstrap with:
# npm run docker:init
# npm run docker:install
# npm run docker:seed
#
# Run with:
# npm run docker:develop
#
# If plan to make a contribution to the project then install root node_modules
# with:
# npm install --ignore-scripts
#
version: '3'
services:
freecodecamp:
image: node:lts
user: node
depends_on:
- db
- mailhog
environment:
- MAILHOG_HOST=mailhog
- MONGOHQ_URL=mongodb://db:27017/freecodecamp
volumes:
- .:/app
- node_modules:/app/node_modules
- client_node_modules:/app/client/node_modules
- server_node_modules:/app/api-server/node_modules
- curriculum_node_modules:/app/curriculum/node_modules
- challenge_md_parser_node_modules:/app/tools/challenge-md-parser/node_modules
- seed_node_modules:/app/tools/scripts/seed/node_modules
- client_plugin_nav_data_node_modules:/app/client/plugins/fcc-create-nav-data/node_modules
working_dir: /app
client:
image: node:lts
user: node
environment:
- API_PROXY=http://api-server:3000
- GATSBY_WEBPACK_PUBLICPATH=http://$DOCKER_HOST_LOCATION:8000/
- HOME_LOCATION=http://$DOCKER_HOST_LOCATION:8000
- API_LOCATION=http://$DOCKER_HOST_LOCATION:3000
volumes:
- .:/app
- node_modules:/app/node_modules
- client_node_modules:/app/client/node_modules
- server_node_modules:/app/api-server/node_modules
- curriculum_node_modules:/app/curriculum/node_modules
- challenge_md_parser_node_modules:/app/tools/challenge-md-parser/node_modules
- seed_node_modules:/app/tools/scripts/seed/node_modules
- client_plugin_nav_data_node_modules:/app/client/plugins/fcc-create-nav-data/node_modules
working_dir: /app/client
command: npm run develop -- -H '0.0.0.0'
ports:
- '8000:8000'
- '9228:9228'
api-server:
image: node:lts
user: node
depends_on:
- db
- mailhog
environment:
- MAILHOG_HOST=mailhog
- MONGOHQ_URL=mongodb://db:27017/freecodecamp
- COOKIE_DOMAIN=$DOCKER_HOST_LOCATION
- HOME_LOCATION=http://$DOCKER_HOST_LOCATION:8000
- API_LOCATION=http://$DOCKER_HOST_LOCATION:3000
volumes:
- .:/app
- node_modules:/app/node_modules
- client_node_modules:/app/client/node_modules
- server_node_modules:/app/api-server/node_modules
- curriculum_node_modules:/app/curriculum/node_modules
- challenge_md_parser_node_modules:/app/tools/challenge-md-parser/node_modules
- seed_node_modules:/app/tools/scripts/seed/node_modules
- client_plugin_nav_data_node_modules:/app/client/plugins/fcc-create-nav-data/node_modules
working_dir: /app/api-server
command: node development-entry.js
ports:
- '3000:3000'
- '9229:9229'
db:
image: mongo:3.6
ports:
- '27017:27017'
volumes:
- dbdata:/data/db
mailhog:
image: mailhog/mailhog
ports:
- '1025:1025'
- '8025:8025'
volumes:
dbdata:
node_modules:
client_node_modules:
server_node_modules:
curriculum_node_modules:
challenge_md_parser_node_modules:
seed_node_modules:
client_plugin_nav_data_node_modules: