Git Product home page Git Product logo

pod's Issues

Support for handling java apps

This may be way out of scope but could you add support for running java apps?

I have an architecture where my node server interacts with a java server via a socket io connection. My node server is set up already with pod and i have tried several things using the .podhook file in order to get my java server running but it does not appear to be working.

In the java server repo i have a jar file that starts the server which i run via (in the .podhook file):

screen -A -m -d -S java-server sh path/to/repo/start_java_server.sh

when i attempt to reattach to the screen after committing and pushing to the repo there are no screens which leads me to believe that the .podfile is not running due to the fact that i dont have an app.js file in the java server repo. I havent tried adding a app.js file yet, i suppose i could try that but would prefer not to have a useless node service running for the sake for spinning up a java server.

Perhaps we could modify the configuration to allow for repositories with no app.js file?

Can't get it working.

I did a normal install, the pod command works but the install has issues

npm http GET https://registry.npmjs.org/pod
npm http 304 https://registry.npmjs.org/pod
npm http GET https://registry.npmjs.org/colors
npm http GET https://registry.npmjs.org/mkdirp
npm http GET https://registry.npmjs.org/async
npm http GET https://registry.npmjs.org/cli-table
npm http GET https://registry.npmjs.org/ejs
npm http GET https://registry.npmjs.org/express
npm http GET https://registry.npmjs.org/pm2
npm http 304 https://registry.npmjs.org/mkdirp
npm http 304 https://registry.npmjs.org/colors
npm http 304 https://registry.npmjs.org/cli-table
npm http 304 https://registry.npmjs.org/async
npm http 304 https://registry.npmjs.org/ejs
npm http 304 https://registry.npmjs.org/pm2
npm http 304 https://registry.npmjs.org/express
npm http GET https://registry.npmjs.org/colors/0.3.0
npm http GET https://registry.npmjs.org/connect/2.12.0
npm http GET https://registry.npmjs.org/commander/1.3.2
npm http GET https://registry.npmjs.org/range-parser/0.0.4
npm http GET https://registry.npmjs.org/cookie/0.1.0
npm http GET https://registry.npmjs.org/fresh/0.2.0
npm http GET https://registry.npmjs.org/buffer-crc32/0.2.1
npm http GET https://registry.npmjs.org/methods/0.1.0
npm http GET https://registry.npmjs.org/send/0.1.4
npm http GET https://registry.npmjs.org/cookie-signature/1.0.1
npm http GET https://registry.npmjs.org/merge-descriptors/0.0.1
npm http GET https://registry.npmjs.org/debug
npm http GET https://registry.npmjs.org/commander/2.1.0
npm http GET https://registry.npmjs.org/pm2-multimeter/0.1.2
npm http GET https://registry.npmjs.org/usage/0.3.9
npm http GET https://registry.npmjs.org/axon-rpc/0.0.2
npm http GET https://registry.npmjs.org/watch/0.8.0
npm http GET https://registry.npmjs.org/axon/1.0.0
npm http GET https://registry.npmjs.org/cron/1.0.1
npm http GET https://registry.npmjs.org/coffee-script
npm http GET https://registry.npmjs.org/eventemitter2/0.4.13
npm http GET https://registry.npmjs.org/debug
npm http 304 https://registry.npmjs.org/range-parser/0.0.4
npm http 304 https://registry.npmjs.org/connect/2.12.0
npm http 304 https://registry.npmjs.org/cookie/0.1.0
npm http 304 https://registry.npmjs.org/colors/0.3.0
npm http 304 https://registry.npmjs.org/commander/1.3.2
npm http 304 https://registry.npmjs.org/fresh/0.2.0
npm http 304 https://registry.npmjs.org/buffer-crc32/0.2.1
npm http 304 https://registry.npmjs.org/send/0.1.4
npm http 304 https://registry.npmjs.org/methods/0.1.0
npm http 304 https://registry.npmjs.org/cookie-signature/1.0.1
npm http 304 https://registry.npmjs.org/debug
npm http 304 https://registry.npmjs.org/merge-descriptors/0.0.1
npm http GET https://registry.npmjs.org/mime
npm http GET https://registry.npmjs.org/keypress
npm http 304 https://registry.npmjs.org/axon-rpc/0.0.2
npm http 304 https://registry.npmjs.org/watch/0.8.0
npm http 304 https://registry.npmjs.org/commander/2.1.0
npm http GET https://registry.npmjs.org/batch/0.5.0
npm http GET https://registry.npmjs.org/qs/0.6.6
npm http GET https://registry.npmjs.org/bytes/0.2.1
npm http GET https://registry.npmjs.org/pause/0.0.1
npm http GET https://registry.npmjs.org/uid2/0.0.3
npm http GET https://registry.npmjs.org/raw-body/1.1.2
npm http GET https://registry.npmjs.org/negotiator/0.3.0
npm http GET https://registry.npmjs.org/multiparty/2.2.0
npm http 304 https://registry.npmjs.org/pm2-multimeter/0.1.2
npm http 304 https://registry.npmjs.org/usage/0.3.9
npm http 304 https://registry.npmjs.org/axon/1.0.0
npm http 304 https://registry.npmjs.org/cron/1.0.1
npm http 304 https://registry.npmjs.org/coffee-script
npm http 304 https://registry.npmjs.org/debug
npm http 304 https://registry.npmjs.org/eventemitter2/0.4.13
npm http 304 https://registry.npmjs.org/mime
npm http 304 https://registry.npmjs.org/keypress
npm http GET https://registry.npmjs.org/commander/1.0.5
npm http GET https://registry.npmjs.org/ms/0.6.2
npm http GET https://registry.npmjs.org/charm
npm http GET https://registry.npmjs.org/bindings
npm http GET https://registry.npmjs.org/configurable/0.0.1
npm http GET https://registry.npmjs.org/escape-regexp/0.0.1
npm http 304 https://registry.npmjs.org/pause/0.0.1
npm http 304 https://registry.npmjs.org/qs/0.6.6
npm http 304 https://registry.npmjs.org/uid2/0.0.3
npm http 304 https://registry.npmjs.org/bytes/0.2.1
npm http 304 https://registry.npmjs.org/batch/0.5.0
npm http 304 https://registry.npmjs.org/raw-body/1.1.2
npm http 304 https://registry.npmjs.org/negotiator/0.3.0
npm http 304 https://registry.npmjs.org/multiparty/2.2.0
npm http 304 https://registry.npmjs.org/commander/1.0.5
npm http 304 https://registry.npmjs.org/ms/0.6.2
npm http 304 https://registry.npmjs.org/charm
npm http 304 https://registry.npmjs.org/bindings

> [email protected] install /usr/lib/node_modules/pod/node_modules/pm2/node_modules/usage
> node-gyp rebuild

npm http 304 https://registry.npmjs.org/configurable/0.0.1
npm http 304 https://registry.npmjs.org/escape-regexp/0.0.1
make: Entering directory `/usr/lib/node_modules/pod/node_modules/pm2/node_modules/usage/build'
  CXX(target) Release/obj.target/sysinfo/src/binding.o
  SOLINK_MODULE(target) Release/obj.target/sysinfo.node
  SOLINK_MODULE(target) Release/obj.target/sysinfo.node: Finished
  COPY Release/sysinfo.node
make: Leaving directory `/usr/lib/node_modules/pod/node_modules/pm2/node_modules/usage/build'
npm http GET https://registry.npmjs.org/readable-stream
npm http GET https://registry.npmjs.org/stream-counter
npm http 304 https://registry.npmjs.org/readable-stream
npm http 304 https://registry.npmjs.org/stream-counter
npm http GET https://registry.npmjs.org/core-util-is
npm http GET https://registry.npmjs.org/isarray/0.0.1
npm http GET https://registry.npmjs.org/string_decoder
npm http GET https://registry.npmjs.org/inherits
npm http 304 https://registry.npmjs.org/inherits
npm http 304 https://registry.npmjs.org/isarray/0.0.1
npm http 304 https://registry.npmjs.org/string_decoder
npm http 304 https://registry.npmjs.org/core-util-is
/usr/bin/pod -> /usr/lib/node_modules/pod/bin/pod
npm WARN unmet dependency /usr/lib/node_modules/block-stream requires inherits@'~2.0.0' but will load
npm WARN unmet dependency undefined,
npm WARN unmet dependency which is version undefined
npm WARN unmet dependency /usr/lib/node_modules/fstream requires inherits@'~2.0.0' but will load
npm WARN unmet dependency undefined,
npm WARN unmet dependency which is version undefined
npm WARN unmet dependency /usr/lib/node_modules/fstream-ignore requires inherits@'2' but will load
npm WARN unmet dependency undefined,
npm WARN unmet dependency which is version undefined
npm WARN unmet dependency /usr/lib/node_modules/fstream-npm requires inherits@'2' but will load
npm WARN unmet dependency undefined,
npm WARN unmet dependency which is version undefined
npm WARN unmet dependency /usr/lib/node_modules/glob requires inherits@'2' but will load
npm WARN unmet dependency undefined,
npm WARN unmet dependency which is version undefined
npm WARN unmet dependency /usr/lib/node_modules/npmconf requires inherits@'~2.0.0' but will load
npm WARN unmet dependency undefined,
npm WARN unmet dependency which is version undefined
npm WARN unmet dependency /usr/lib/node_modules/tar requires inherits@'2' but will load
npm WARN unmet dependency undefined,
npm WARN unmet dependency which is version undefined
[email protected] /usr/lib/node_modules/pod
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected] ([email protected])
├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected])
└── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected])

Pod Remote Private Repo over HTTPS Causes Freeze

When trying to add a private repo like so:

pod remote test https://github.com/<autho>/<repo>.git

Git asks for a password, but the terminal is frozen (does not respond to Ctrl + C).

I was able to get around this by adding credentials to ~/.netrc, but that is not ideal.

Any chance for .podrc within each project?

Instead of ~/.podrc make it look within the project's dir for .podrc and then ~/.podrc? Would help with the deployment process/not having to edit one gigantic file if I have 40 projects (I like to modularize a lot of things).

初始化失败!

$ pod help
Hello! It seems it's your first time running pod on this machine.
Please specify a root directory for pod to store your apps' repos and work trees:
/home/webapp

/usr/lib/node_modules/pod/lib/cli.js:132
return cmd.split(' ')[0]
^
TypeError: Cannot call method 'split' of undefined
at stripArgs (/usr/lib/node_modules/pod/lib/cli.js:132:16)
at initConfig (/usr/lib/node_modules/pod/lib/cli.js:124:17)
at globalConfig.root (/usr/lib/node_modules/pod/lib/cli.js:98:17)
at ReadStream. (/usr/lib/node_modules/pod/lib/cli.js:159:9)
at ReadStream.g (events.js:175:14)
at ReadStream.EventEmitter.emit (events.js:95:17)
at ReadStream. (stream_readable.js:746:14)
at ReadStream.EventEmitter.emit (events.js:92:17)
at emitReadable
(_stream_readable.js:408:10)
at emitReadable (_stream_readable.js:404:5)
$ sh: turning off NDELAY mode

pod web times out on long builds

Github times out because pod web is not responding to its POST quickly enough. For example, if I'm doing a gulp build that takes longer than 30 seconds.

Maybe res.end() should happen outside of executeHook() ?

i.e.

if (app && verify(req, app, payload)) {
        executeHook(appid, app, payload)
        res.end()
    }

instead of

if (app && verify(req, app, payload)) {
        executeHook(appid, app, payload, function () {
            res.end()
        })
    }

pod web POD ERR method "findByFullPath" does not exist

On a fresh Ubuntu 16.04 Digital Ocean VPS, after installing Node 6.x

~$ npm install -g pod
~$ pod
Hello! It seems it's your first time running pod on this machine.
Please specify a directory for pod to put stuff in.
- Make sure your account has full access to that directory.
- You can use relative paths (resolved against your cwd).
path: pod
target path /root/pod doesn't exist. create it? (y/N)y
...
~$ pod web
POD ERR method "findByFullPath" does not exist

allow bare filenames in package.json

npm allows package.json to have fields like

  "main": "./server",

but pod throws an error

POD ERR cannot locate main script for <appname> (poddir/apps/appname/./server)

unless this is converted to "main": "./server.js"

Git branches in separate folders

i would like to send my project to separate folders on ec2 linux machine and run them as a simultaneous processes, its production and development. How can i do that?

Best,
Vladimir Minkin

branch selection doesn't seem to work

I've got a branch specified in my .podrc but the app directory only shows the master branch. A quick search of api.js doesn't show that it's using the branch config anyway. Does this feature work?

not working on node 0.12.0

gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23)
gyp ERR! stack at ChildProcess.emit (events.js:110:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:1067:12)
gyp ERR! System Linux 2.6.32-504.8.1.el6.x86_64
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/local/lib/node_modules/pod/node_modules/pm2/node_modules/usage
gyp ERR! node -v v0.12.0
gyp ERR! node-gyp -v v1.0.2
gyp ERR! not ok
npm ERR! Linux 2.6.32-504.8.1.el6.x86_64
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "pod"
npm ERR! node v0.12.0
npm ERR! npm v2.5.1
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! This is most likely a problem with the usage 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 their info via:
npm ERR! npm owner ls usage
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! /opt/mybooking/npm-debug.log

Upgrade to pm2 0.14.x

There are several really nice improvements in the new pm2 0.14.x such as the --lines parameter among others. I'm not sure if the breaking changes between 0.12.x and 0.14.x is a problem or if pod could just upgrade without any modifications?

pod remote + pod web

pod web provides a status checking / monitor interface on the web.
This process should also expose an api endpoint to accept web hooks from Github.

Create an app with remote repository with Github shorthand:

pod remote my-remote-app username/repo

Upon receiving web hook post requests from github, this will run the same routine to fetch and restart the app.

Support yarn

add support to yarn if the project has yarn.lock file

app's working directory is user home

When I start the pod of a node project which writes and reads files, it is trying to do it relative to my home path instead of from the app. Is there a setting I can put in the .podrc that sets my current working directory?

How to track a remote gitlab repo

Starting in 0.8.2, GitLab webhooks are also supported.

But following the guide using a remote repo, it seems github is the only option for creating remote repo. So if I use pod remote foo-app at15/foo it will track github.com/at15/foo.git How can I let pod track repos in self host gitlab instance, like git.abc.com/at15/foo.git? Thanks a lot.

Private repositories?

Hi,

Pod is successfully creating a remote app from a public github repository, but fails with "fatal: repository does not exist" for a private one. I assumed that this would work given that you can clone private repos via ssh. Am I missing something?

pod remote stuck

Hi

I am trying to create app with github tracking with command pod remote app stfoo/app but it outputs message Username for 'https://github.com': and blocks terminal, so I can't input any symbols or even interrupt pod with ctrl+c.

After it in pod list I see this:

root@stfoo:~# pod list

    name      status      port      restarts      uptime      memory      CPU 

    book      BROKEN      ????                                                

pod start <app> freezes

Hi,
I love that this exists, however, everytime I try to create an app, it ignores the default_script setting in the APP section of the config as if it isn't being overridden. I am developing a node.js app and usually to run it, I open a screen and restart it by typing node app.js. However, because I am using visual studio to develop this app, there is always a subfolder inside the git repo. So I modify my config like this to ensure that the subdirectory is taken into account:

{
"root": "/home/git/POD",
"node_env": "development",
"default_script": "app.js",
"max_restarts": 5,
"apps": {
    "STARS": {
            "default_script":"NodejsConsoleApp3/app.js"
    }
},
"web": {}

}

However, it is completely ignoring the override in the STARS app config and still looking for /home/git/POD/apps/STARS/app.js when it should be looking for /home/git/POD/apps/STARS/NodejsConsoleApp3/app.js.

Now here is the frustrating part, if I change the global "default_script" to what I want and set it to "NodejsConsoleApp3/app.js" and then type "pod start STARS", putty appears to freeze the ssh. I have to hit CTRL+C twice to make it break it. After that, typing in "pod list", I see that my app is there, but the STATUS shows ERROR, with an instant high restart count. What is going on, all I want to do is develop nodejs in visual studio, publish to my virtual private server via git, and automatically restart my nodejs remotely on a push. Why does it freeze? It shouldn't. Even if there are no http or https objects, it still freezes. Any ideas?

pod hangs just after initialisation

Hello,

First, I want to thank you for this very usefull utility. I've already used it with success on other projects and this just works perfectly as expected !

Today I've just installed a brand new VM with Ubuntu Server 12.04 and wanted to install POD to easily manage my apps.

Node.js and POD installed without any issues, but when I want to create my first app (and init the pod folders), it just hangs after creating the config file.

myuser@my-app:~$ pod create my-app
Hello! It seems it's your first time running pod on this machine.
Please specify a directory for pod to put stuff in.
- Make sure your account has full access to that directory.
- You can use relative paths (resolved against your cwd).
path: ./pod-apps
target path /home/myuser/pod-apps doesn't exist. create it? (y/N)          y

POD created root directory: /home/myuser/pod-apps
POD created repos directory: /home/myuser/pod-apps/repos
POD created apps directory: /home/myuser/pod-apps/apps
POD created config file at: /home/myuser/.podrc

I've tried to cancel the process and launch pod list or any other commands, but it hangs immediatly and nothing happens.

Here is the .podrc created automatically :

{
    "root": "/home/myuser/pod-apps",
    "node_env": "development",
    "default_script": "app.js",
    "apps": {},
    "web": {}
}

Do you have any idea where it can come from ?

Thanks for your help.

Pod web keeps restarting when started as non-root

It shouldn't need root for the default port, but for some reason the restarts just skyrocketing. The problem is that I create my pod apps as my own user, so running the web interface as root will work but not show any pod-apps...

Restarts

Does pod create a log file anywhere that I could check for errors?

Getting pod to play nice with authbind

I'm having major difficulties trying to start authbind, which starts node, which starts pod, which starts all NodeJS apps.

Ideally, I'd just like to inject "authbind node app.js" in to pod.

The reason for this is that I'm using port numbers under 1024, meaning that root privileges are required, but authbind allows me to circumvent this (on a port by port basis) and run as a regular user, but authbind needs to be running first.

My upstart script is currently starting it like this:
exec start-stop-daemon --start --chuid MY_USER --exec /usr/bin/authbind /usr/local/bin/node /usr/local/lib/node_modules/pod/bin/pod -- startall

What happens at the moment is that pod is properly starting my NodeJS app, but it is node playing nicely with authbind, so I'm getting this:
error: Could not start server on port MY_PORT.
error: Ports under 1000 require root privileges.
error: bind EACCES

I can verify that authbind does work as intended by just running "authbind node app.js".

Any help on this?

POD ERR ENOENT

sudo pod create test
POD ERR ENOENT, mkdir '/home/webapp/repos/test.git'

.podrc配置如下:
{
"root": "/home/webapp",
"nodeEnv": "development",
"defaultScript": "app.js",
"editor": "vi",
"apps": {
}
}

add `pod prune`

pod prune shoud remove extraneous files that do not belong to any app in .podrc

Pod log file generation

Pod has been generating a new log file each time an application is restarted.

Can this be disabled anywhere? I'd ideally just want one file.

pod returns 500 error on first github ping

This was really confusing for me at first, I followed the instructions exactly for adding a GitHub hook but then I got the red error symbol.

screen shot 2016-04-27 at 23 09 37

The problem is that before GitHub sends any push events, it sends a "ping" event to test if the connection is working. It could be great to have pod respond to that with a 200 OK status instead of throwing the error TypeError: Cannot read property "length" of undefined, to avoid confusion.

I added a note about this to the wiki for now https://github.com/yyx990803/pod/wiki/Using-a-remote-repo#3-setup-github-remote-hook

Add support for "forever" in configuration

I would very much like to use forever to ensure my server remains running even if it crashes. I dont think it would be that hard to change up the config and cli.sh to accommodate for that.

pod start, stop and restart hang

Hi there,

when using pod start, stop and restart it hangs and never exits, doesn't print anything to the console either. Starting does seem to work sometimes though when Ctrl+c'ing and hitting pod list. I tried to set the env var DEBUG=api to get at least some messages what's happening, but that didn't really work. Is there any way to get more verbosity so I can see where things go wrong? For now I assume it has to do with Satan since pod list works just fine.

npm i installed 0.12.16 of pm2, is that version known to work?

pod rm hangs

pod rm appname hangs after a really delete appName? (y/N) prompt I press y and press enter than nothing happens ... same for pod prune

`pod` command conflict with CocoaPods

Just letting you know another opensource command line tool is already using pod, CocoaPods.

In the interest of devs like myself using Objective-C and JavaScript, changing the name would avoid confusion and install issues.

Port number do not come to pm2 satan

PM2 require port number for visualization, but in your code (api.js):

for (var o in appInfo.config) {
if (
o !== 'port' &&
o !== 'node_env' &&
o !== 'remote' &&
o !== 'username' &&
o !== 'password' &&
o !== 'jsonp'
) {
app[o] = appInfo.config[o]
}
}

Maybe you'll remove o !== 'port' ? It will solve the issue.

Can't globally install pod anymore?

I've done this many times, but ever since the update to v.0.12.0, I think it broke. This is what I get when I try to do "npm install -g pod":

gyp WARN EACCES user "root" does not have permission to access the dev dir "/root/.node-gyp/0.12.0" gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/local/lib/node_modules/pod/node_modules/pm2/node_modules/usage/.node-gyp" child_process: customFds option is deprecated, use stdio instead. make: Entering directory `/usr/local/lib/node_modules/pod/node_modules/pm2/node_modules/usage/build' CXX(target) Release/obj.target/sysinfo/src/binding.o ../src/binding.cpp: In function ‘void RegisterModule(v8::Handle)’: ../src/binding.cpp:8:17: error: ‘NewSymbol’ is not a member of ‘v8::String’ target->Set(String::NewSymbol("HERTZ"), Number::New(sysconf(_SC_CLK_TCK))); ^ ../src/binding.cpp:8:77: error: no matching function for call to ‘v8::Number::New(long int)’ target->Set(String::NewSymbol("HERTZ"), Number::New(sysconf(_SC_CLK_TCK))); ^ ../src/binding.cpp:8:77: note: candidate is: In file included from /usr/local/lib/node_modules/pod/node_modules/pm2/node_modules/usage/.node-gyp/0.12.0/src/node.h:61:0, from ../src/binding.h:1, from ../src/binding.cpp:1: /usr/local/lib/node_modules/pod/node_modules/pm2/node_modules/usage/.node-gyp/0.12.0/deps/v8/include/v8.h:1999:24: note: static v8::Local v8::Number::New(v8::Isolate*, double) static Local New(Isolate* isolate, double value); ^ /usr/local/lib/node_modules/pod/node_modules/pm2/node_modules/usage/.node-gyp/0.12.0/deps/v8/include/v8.h:1999:24: note: candidate expects 2 arguments, 1 provided ../src/binding.cpp:9:17: error: ‘NewSymbol’ is not a member of ‘v8::String’ target->Set(String::NewSymbol("PAGE_SIZE"), Number::New(sysconf(_SC_PAGESIZE))); ^ ../src/binding.cpp:9:82: error: no matching function for call to ‘v8::Number::New(long int)’ target->Set(String::NewSymbol("PAGE_SIZE"), Number::New(sysconf(_SC_PAGESIZE))); ^ ../src/binding.cpp:9:82: note: candidate is: In file included from /usr/local/lib/node_modules/pod/node_modules/pm2/node_modules/usage/.node-gyp/0.12.0/src/node.h:61:0, from ../src/binding.h:1, from ../src/binding.cpp:1: /usr/local/lib/node_modules/pod/node_modules/pm2/node_modules/usage/.node-gyp/0.12.0/deps/v8/include/v8.h:1999:24: note: static v8::Local v8::Number::New(v8::Isolate*, double) static Local New(Isolate* isolate, double value); ^ /usr/local/lib/node_modules/pod/node_modules/pm2/node_modules/usage/.node-gyp/0.12.0/deps/v8/include/v8.h:1999:24: note: candidate expects 2 arguments, 1 provided ../src/binding.cpp:17:17: error: ‘NewSymbol’ is not a member of ‘v8::String’ target->Set(String::NewSymbol("OS"), String::New(OS)); ^ ../src/binding.cpp:17:42: error: ‘New’ is not a member of ‘v8::String’ target->Set(String::NewSymbol("OS"), String::New(OS)); ^ make: *** [Release/obj.target/sysinfo/src/binding.o] Error 1 make: Leaving directory`/usr/local/lib/node_modules/pod/node_modules/pm2/node_modules/usage/build' gyp ERR! build error gyp ERR! stack Error: `make` failed with exit code: 2 gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23) gyp ERR! stack at ChildProcess.emit (events.js:110:17) gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:1067:12) gyp ERR! System Linux 3.13.0-43-generic gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" gyp ERR! cwd /usr/local/lib/node_modules/pod/node_modules/pm2/node_modules/usage gyp ERR! node -v v0.12.0 gyp ERR! node-gyp -v v1.0.2 gyp ERR! not ok npm ERR! Linux 3.13.0-43-generic npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "pod" npm ERR! node v0.12.0 npm ERR! npm v2.5.1 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! This is most likely a problem with the usage 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 their info via:
npm ERR! npm owner ls usage
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! /root/npm-debug.log

port not exposed

configuration: alpine linux docker

.podrc

{
    "root": "/srv",
    "node_env": "development",
    "default_script": "app.js",
    "apps": {
        "microservice": {
            "port": 4000,
            "PORT": 4000,
            "script": "/srv/apps/microservice/index.js"
        }
    },
    "web": {
        "username": "admin",
        "password": "test",
        "port": 19999,
        "jsonp": true
    }
}

index.js

....
console.log("listening to http requests @ port "+process.env.PORT)                                                                                                                                
console.dir(process.env)
http.createServer(router).listen(process.env.PORT) 

output

{ HOSTNAME: 'nodepod',
  SHELL: '/bin/bash',
  TERM: 'xterm',
  MICROSERVICES: '1',
  CONFIGPROXY_AUTH_TOKEN: 'test',
  PROXY: '1',
  USER: 'nodejs',
  PATH: '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin',
  _: '/usr/bin/pod',
  PWD: '/srv/apps/microservice',
  VERSION: 'v4.1.1',
  SHLVL: '2',
  LOGNAME: 'nodejs',
  HOME: '/home/nodejs',
  SILENT: 'true',
  name: 'microservice',
  env: '[object Object]',
  pm_exec_path: '/srv/apps/microservice/index.js',
  pm_cwd: '/srv/apps/microservice',
  exec_interpreter: 'node',
  instances: '1',
  exec_mode: 'cluster_mode',
  node_args: '',
  pm_out_log_path: '/home/nodejs/.pm2/logs/microservice-out-4.log',
  pm_err_log_path: '/home/nodejs/.pm2/logs/microservice-error-4.log',
  pm_pid_path: '/home/nodejs/.pm2/pids/microservice-4.pid',
  NODE_APP_INSTANCE: '0',
  NODE_ENV: 'development',
  OLDPWD: '/',
  status: 'launching',
  pm_uptime: '1462300425415',
  axm_actions: '',
  axm_monitor: '[object Object]',
  axm_options: '[object Object]',
  axm_dynamic: '[object Object]',
  vizion_running: 'false',
  created_at: '1462300425278',
  pm_id: '4',
  restart_time: '6',
  unstable_restarts: '0',
  started_inside: 'false',
  command: '[object Object]',
  _pm2_version: '0.12.16',
  versioning: 'null',
  exit_code: 'SIGTERM' }
listening to http requests @ port undefined

Github Webhook - "SyntaxError: Unexpected token u"

Heya,

Just followed this to setup a remote repo with pod.

after running pod remote app-name organisation/app-name

I see it successfully pulled the master branch inside the /apps folder(repos folder is empty.). Next up got the web tool started and setup the webhook accordingly.

Wanted to add "bower install" along with npm install when a new fetch is done, so created the .podhook file accordingly and added it to <pod folder>/apps/<app-name>/

tweaked ~/.podrc such as:

{
    "root": "/usr/maidsafe/pod",
    "node_env": "development",
    "default_script": "server.js",
    "apps": {
        "network_visualiser": {
            "remote": "maidsafe/Network-Visualiser",
            "branch": "client-ui",
            "node_env": "production",
            "port": 8080
        }
    },
    "web": {}
}

Now when I commited to the client-ui branch, I can see the webhook executed from github interface, however the response is:

Headers
Connection: keep-alive
Date: Wed, 18 Jun 2014 13:50:38 GMT
Transfer-Encoding: chunked
X-Powered-By: Express

Body
SyntaxError: Unexpected token u

and ofc it doesn't seem to have done anything.

If i run pod hooks, I see:

POD ERR ENOENT, open '/usr/maidsafe/pod/repos/network_visualiser.git/hooks/post-receive'

As i mentioned the repos folder is empty as I'm just using a remote app setup. Also checked the logs from ~/.pm2/logs

Only thing in the err.log is:

connect.multipart() will be removed in connect 3.0

Not sure what I'm doing wrong, or if the webhook just isnt working.

This is from the web monitor/json output:

[
  {
    "name": "network_visualiser",
    "port": 8080,
    "broken": false,
    "status": "OFF",
    "uptime": null,
    "memory": null,
    "cpu": null,
    "instanceCount": 0,
    "raw": {
      "name": "network_visualiser",
      "repoPath": "/usr/maidsafe/pod/repos/network_visualiser.git",
      "workPath": "/usr/maidsafe/pod/apps/network_visualiser",
      "config": {
        "remote": "maidsafe/Network-Visualiser",
        "branch": "client-ui",
        "node_env": "production",
        "port": 8080
      },
      "script": "/usr/maidsafe/pod/apps/network_visualiser/server.js",
      "port": 8080,
      "instances": null,
      "broken": false,
      "uptime": null
    }
  }
]

api.getAppInfo do not support pm2 style script definition

Look at ./podrc notation

{
apps: {
appname: {
... pm2 application configuration + some extras
}
}

currently in code:

info.script = path.resolve(info.workPath, getAppMainScript(info.workPath) || globalConfig.default_script)

maybe this is more clean?
info.script = path.resolve(info.workPath, getAppMainScript(info.workPath) || info.config.script || globalConfig.default_script)

  • add o !== 'script' && in prepareConfig() for sure

cause .script is pm2 script path.

PM2 dependency is out of date

We noticed that the pod version of PM2 is at ~0.7.7 but the latest PM2 release is now at ~0.9.4

Two fold question:

  1. Would you forsee any issue with us just installing the latest PM2 inside of pod's context in our environments?
  2. Is there any plan to officially update this dependency in a new version of pod?

Thanks very much.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.