msanand / docker-workflow Goto Github PK
View Code? Open in Web Editor NEWSample docker workflow with Node.js, Redis and NGiNX
Home Page: http://anandmanisankar.com/posts/docker-container-nginx-node-redis-example/
Sample docker workflow with Node.js, Redis and NGiNX
Home Page: http://anandmanisankar.com/posts/docker-container-nginx-node-redis-example/
Hi @msanand,
thanks for making this helpful Docker starter ๐
I noticed that the repo misses a license file. Would you request a PR to license it under MIT?
Cheers
I receive the following errors
debconf: unable to initialize frontend: Readline
and then:
Running hooks in /etc/ca-certificates/update.d...
done.
/bin/sh: 1: sudo: not found
ERROR: Service 'node2' failed to build: The command '/bin/sh -c apt-get update && apt-get -y install curl && curl -sL https://deb.nodesource.com/setup | sudo bash - && apt-get -y install python build-essential nodejs' returned a non-zero code: 127
I use Ubuntu 14.04
Forked the project, and only change i've made is to add chai
to package.json and require it in the tests file. Tests fail on CircleCI saying chai
can't be found.
Looks like actually requiring anything from node_modules will fail during the test step.
Made a pull request so you can see what i'm talking about (#5)
Hi, I was just trying your example, after reading your blog post; but running docker-compose up results in the nodes terminate with exceptions:
Attaching to dockerworkflow_redis_1, dockerworkflow_node2_1, dockerworkflow_node3_1, dockerworkflow_node1_1, dockerworkflow_nginx_1
redis_1 | [1] 02 Apr 12:50:47.707 # Warning: no config file specified, using the default config. In order to specify a config file use /usr/bin/redis-server /path/to/redis.conf
redis_1 | _._
redis_1 | _.-``__ ''-._
redis_1 | _.-`` `. `_. ''-._ Redis 2.8.4 (00000000/0) 64 bit
redis_1 | .-`` .-```. ```\/ _.,_ ''-._
redis_1 | ( ' , .-` | `, ) Running in stand alone mode
redis_1 | |`-._`-...-` __...-.``-._|'` _.-'| Port: 6379
redis_1 | | `-._ `._ / _.-' | PID: 1
redis_1 | `-._ `-._ `-./ _.-' _.-'
redis_1 | |`-._`-._ `-.__.-' _.-'_.-'|
redis_1 | | `-._`-._ _.-'_.-' | http://redis.io
redis_1 | `-._ `-._`-.__.-'_.-' _.-'
redis_1 | |`-._`-._ `-.__.-' _.-'_.-'|
redis_1 | | `-._`-._ _.-'_.-' |
redis_1 | `-._ `-._`-.__.-'_.-' _.-'
redis_1 | `-._ `-.__.-' _.-'
redis_1 | `-._ _.-'
redis_1 | `-.__.-'
redis_1 |
redis_1 | [1] 02 Apr 12:50:47.708 # Server started, Redis version 2.8.4
redis_1 | [1] 02 Apr 12:50:47.708 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
redis_1 | [1] 02 Apr 12:50:47.709 * The server is now ready to accept connections on port 6379
node2_1 | 2 Apr 12:50:48 - [nodemon] v1.3.7
node2_1 | 2 Apr 12:50:48 - [nodemon] to restart at any time, enter `rs`
node2_1 | 2 Apr 12:50:48 - [nodemon] watching: *.*
node2_1 | 2 Apr 12:50:48 - [nodemon] starting `node /src/index.js`
node2_1 |
node2_1 | module.js:340
node2_1 | throw err;
node2_1 | ^
node2_1 | Error: Cannot find module 'express'
node2_1 | at Function.Module._resolveFilename (module.js:338:15)
node2_1 | at Function.Module._load (module.js:280:25)
node2_1 | at Module.require (module.js:364:17)
node2_1 | at require (module.js:380:17)
node2_1 | at Object.<anonymous> (/src/index.js:1:77)
node2_1 | at Module._compile (module.js:456:26)
node2_1 | at Object.Module._extensions..js (module.js:474:10)
node2_1 | at Module.load (module.js:356:32)
node2_1 | at Function.Module._load (module.js:312:12)
node2_1 | at Function.Module.runMain (module.js:497:10)
node2_1 | 2 Apr 12:50:48 - [nodemon] app crashed - waiting for file changes before starting...
node3_1 | 2 Apr 12:50:50 - [nodemon] v1.3.7
node3_1 | 2 Apr 12:50:50 - [nodemon] to restart at any time, enter `rs`
node3_1 | 2 Apr 12:50:50 - [nodemon] watching: *.*
node3_1 | 2 Apr 12:50:50 - [nodemon] starting `node /src/index.js`
node3_1 |
node3_1 | module.js:340
node3_1 | throw err;
node3_1 | ^
node3_1 | Error: Cannot find module 'express'
node3_1 | at Function.Module._resolveFilename (module.js:338:15)
node3_1 | at Function.Module._load (module.js:280:25)
node3_1 | at Module.require (module.js:364:17)
node3_1 | at require (module.js:380:17)
node3_1 | at Object.<anonymous> (/src/index.js:1:77)
node3_1 | at Module._compile (module.js:456:26)
node3_1 | at Object.Module._extensions..js (module.js:474:10)
node3_1 | at Module.load (module.js:356:32)
node3_1 | at Function.Module._load (module.js:312:12)
node3_1 | at Function.Module.runMain (module.js:497:10)
node3_1 | 2 Apr 12:50:50 - [nodemon] app crashed - waiting for file changes before starting...
node1_1 | 2 Apr 12:50:51 - [nodemon] v1.3.7
node1_1 | 2 Apr 12:50:51 - [nodemon] to restart at any time, enter `rs`
node1_1 | 2 Apr 12:50:51 - [nodemon] watching: *.*
node1_1 | 2 Apr 12:50:51 - [nodemon] starting `node /src/index.js`
node1_1 |
node1_1 | module.js:340
node1_1 | throw err;
node1_1 | ^
node1_1 | Error: Cannot find module 'express'
node1_1 | at Function.Module._resolveFilename (module.js:338:15)
node1_1 | at Function.Module._load (module.js:280:25)
node1_1 | at Module.require (module.js:364:17)
node1_1 | at require (module.js:380:17)
node1_1 | at Object.<anonymous> (/src/index.js:1:77)
node1_1 | at Module._compile (module.js:456:26)
node1_1 | at Object.Module._extensions..js (module.js:474:10)
node1_1 | at Module.load (module.js:356:32)
node1_1 | at Function.Module._load (module.js:312:12)
node1_1 | at Function.Module.runMain (module.js:497:10)
node1_1 | 2 Apr 12:50:51 - [nodemon] app crashed - waiting for file changes before starting...
Running it on CircleCI give me this error:
$docker-compose run -d --no-deps node1
client and server don't have same version (client : 1.19, server: 1.18) docker-compose run -d --no-deps node1 returned exit code 1
You can check on: https://circleci.com/gh/sebicas/docker-workflow/1
Any ideas of what can be done?
npm WARN [email protected] No description
npm WARN [email protected] No repository field.
npm ERR! Linux 3.10.0-327.28.3.el7.x86_64
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install"
npm ERR! node v4.2.6
npm ERR! npm v3.5.2
npm ERR! code ELIFECYCLE
npm ERR! [email protected] install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the hiredis package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs hiredis
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls hiredis
npm ERR! There is likely additional logging output above.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.