File tree Expand file tree Collapse file tree 5 files changed +2769
-457
lines changed
Expand file tree Collapse file tree 5 files changed +2769
-457
lines changed Original file line number Diff line number Diff line change 11# formationNode
22
3+
4+ ## Run
35```
46docker-compose up
57```
8+
9+ ## Link
10+ [ App] ( node.localhost )
11+
12+ [ Client Mongo] ( moongo.localhost )
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ var socket = require('./../socket');
1313 * Get port from environment and store in Express.
1414 */
1515
16- var port = normalizePort ( process . env . PORT || '8080 ' ) ;
16+ var port = normalizePort ( process . env . PORT || '3001 ' ) ;
1717app . set ( 'port' , port ) ;
1818
1919/**
Original file line number Diff line number Diff line change @@ -2,6 +2,16 @@ version: '3'
22
33services :
44
5+ reverse-proxy :
6+ image : traefik:v2.0
7+ command : --api.insecure=true --providers.docker
8+ ports :
9+ - " 80:80"
10+ # The Web UI (enabled by --api.insecure=true)
11+ - " 8080:8080"
12+ volumes :
13+ - /var/run/docker.sock:/var/run/docker.sock
14+
515 mongodb :
616 image : mongo:latest
717 ports :
@@ -10,12 +20,15 @@ services:
1020 - mongodb_data_container:/data/db
1121
1222 mongodbclient :
13- image : mongoclient/mongoclient
14- ports :
15- - 3000:3000
23+ image : mongoclient/mongoclient:latest
24+ environment :
25+ MONGOCLIENT_DEFAULT_CONNECTION_URL : " mongodb://mongodb:27017/formation-node"
26+ labels :
27+ - " traefik.http.routers.mongodbclient.rule=Host(`mongo.localhost`)"
28+ - " traefik.http.services.mongodbclient.loadbalancer.server.port=3000"
1629
1730 node :
18- image : thecodingmachine/nodejs:14
31+ image : thecodingmachine/nodejs:16
1932 volumes :
2033 - ./:/usr/src/app
2134 environment :
@@ -25,8 +38,10 @@ services:
2538 - mongodb
2639 links :
2740 - mongodb
28- ports :
29- - 8080:8080
41+ labels :
42+ - " traefik.http.routers.api.rule=Host(`node.localhost`)"
43+ - " traefik.http.services.api.loadbalancer.server.port=3001"
44+
3045
3146volumes :
3247 mongodb_data_container :
You can’t perform that action at this time.
0 commit comments