-
Notifications
You must be signed in to change notification settings - Fork 190
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fixed EACCES exception thrown when install node packages * Added compose override file for 2 node example * Updated .gitignore to only remove root override file * Added RethinkDB
- Loading branch information
Showing
10 changed files
with
96 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,4 +38,4 @@ jspm_packages | |
|
||
# Project Specific | ||
data | ||
docker-compose.override.yml | ||
./docker-compose.override.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# docker-compose.override.yml | ||
|
||
version: '2' | ||
|
||
services: | ||
node2: # name of new container | ||
extends: node # extends the settings from the "node" container | ||
build: | ||
context: ./node | ||
args: | ||
- PROJECT_PATH=second-app | ||
entrypoint: run-nodock "node index.js" # the entrypoint for the "node2" container | ||
nginx: | ||
ports: | ||
- "10000:10000" # the port(s) to forward for the "node2" container | ||
links: | ||
- node2 # link "nginx" to "node2" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
## RethinkDB Service | ||
|
||
### Setup | ||
|
||
Copy the index file in this folder to the project root: | ||
|
||
```bash | ||
cd <project_folder>/ | ||
|
||
cp -r nodock/_examples/rethinkdb/* . | ||
``` | ||
|
||
### Usage | ||
|
||
```bash | ||
cd nodock/ | ||
|
||
docker-compose up -d node rethinkdb nginx | ||
``` | ||
|
||
By going to `127.0.0.1` in your browser you should be seeing a nice greeting! | ||
|
||
You can access the RethinkDB GUI via `127.0.0.1:28080`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
var express = require('express'); | ||
var app = express(); | ||
var r = require('rethinkdb'); | ||
|
||
app.get('/', function(req, res) { | ||
r.connect({ | ||
host: 'rethinkdb', | ||
port: 28015, | ||
authKey: '', | ||
}, function(err) { | ||
|
||
if (!err) { | ||
res.send('You are amazing'); | ||
} else { | ||
res.send('Could not connect to RethinkDB :('); | ||
} | ||
|
||
}); | ||
}); | ||
|
||
app.listen(8000); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"name": "example-rethinkdb-node-docker", | ||
"version": "1.0.0", | ||
"description": "", | ||
"main": "index.js", | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
}, | ||
"author": "", | ||
"license": "MIT", | ||
"dependencies": { | ||
"express": "^4.14.0", | ||
"rethinkdb": "^2.3.3" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
FROM rethinkdb | ||
|
||
CMD ["rethinkdb", "--bind", "all"] |