strongloop / strong-pm

deployer for node applications
http://strong-pm.io
Other
1k stars 71 forks source link

Cannot find package.json if in subdirectory of .git root when deployed to server #345

Closed bryanharris closed 7 years ago

bryanharris commented 8 years ago

I am having trouble running my service. My directory structure looks like this:

.git
www/
+-- package.json
+-- server.js
+-- ...

I can build and deploy to my remote server using git from inside the www directory on my local machine, but I can't run the app on the server. When it tries to run, I see an error in on the server's /var/log/upstart/strong-pm.log:

package.json ENOENT: no such file or directory, open '/var/lib/strong-pm/svc/1/work/9b0266fe84b4fb0832ccee763e5f9d37388375ef.1463110129776/package.json'

Looking in the actual directory, all of the files are there, but inside the www sub directory. So if it looked for /var/lib/strong-pm/svc/1/work/9b0266fe84b4fb0832ccee763e5f9d37388375ef.1463110129776/www/package.json it would work.

Am I missing a configuration step or is this not supported?

Just want to note that if I build --pack and deploy the packaged tgz, the server works great.

Thanks!

bryanharris commented 8 years ago

Would this be better moved to the strongloop ctl project? Perhaps the deploy is putting the code in the wrong location?

sam-github commented 7 years ago

package.json must be at the git root