Skip to content

Commit

Permalink
update 2022
Browse files Browse the repository at this point in the history
  • Loading branch information
erl committed May 17, 2022
1 parent 92e77a0 commit b467ae6
Show file tree
Hide file tree
Showing 5 changed files with 2,769 additions and 457 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# formationNode


## Run
```
docker-compose up
```

## Link
[App](node.localhost)

[Client Mongo](moongo.localhost)
2 changes: 1 addition & 1 deletion bin/www
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ var socket = require('./../socket');
* Get port from environment and store in Express.
*/

var port = normalizePort(process.env.PORT || '8080');
var port = normalizePort(process.env.PORT || '3001');
app.set('port', port);

/**
Expand Down
27 changes: 21 additions & 6 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@ version: '3'

services:

reverse-proxy:
image: traefik:v2.0
command: --api.insecure=true --providers.docker
ports:
- "80:80"
# The Web UI (enabled by --api.insecure=true)
- "8080:8080"
volumes:
- /var/run/docker.sock:/var/run/docker.sock

mongodb:
image: mongo:latest
ports:
Expand All @@ -10,12 +20,15 @@ services:
- mongodb_data_container:/data/db

mongodbclient:
image: mongoclient/mongoclient
ports:
- 3000:3000
image: mongoclient/mongoclient:latest
environment:
MONGOCLIENT_DEFAULT_CONNECTION_URL: "mongodb://mongodb:27017/formation-node"
labels:
- "traefik.http.routers.mongodbclient.rule=Host(`mongo.localhost`)"
- "traefik.http.services.mongodbclient.loadbalancer.server.port=3000"

node:
image: thecodingmachine/nodejs:14
image: thecodingmachine/nodejs:16
volumes:
- ./:/usr/src/app
environment:
Expand All @@ -25,8 +38,10 @@ services:
- mongodb
links:
- mongodb
ports:
- 8080:8080
labels:
- "traefik.http.routers.api.rule=Host(`node.localhost`)"
- "traefik.http.services.api.loadbalancer.server.port=3001"


volumes:
mongodb_data_container:
Expand Down
Loading

0 comments on commit b467ae6

Please sign in to comment.