Skip to content

PaperElectron/node-ansible-upstart

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 

Repository files navigation

node-ansible-upstart

####Install and run a node application with upstart.


Requirements

  • Ansible v1.9.1+
  • npm and node on remote host.

Configuration and setup

Download

	git clone https://github.com/PaperElectron/node-ansible-upstart.git

Edit variables.yml

This file is pretty self explanitory, it contains the user names, groups and variables needed to create the upstart job.

---
npm_app: 'coolApp' ### application to run
service: 'my-service' ### service name
description: 'Cool app' ### description 
authbind: false ### setup authbind for port 80 and 443?
service_user: coolapp ### will create /var/www/coolapp
service_group: www-data ### group, also used for authbind
env_vars: ### Env variables to add to export on service start
    - env: HOME
      value: /var/www/coolapp
    - env: NODE_ENV
      value: production  
### Command to execute      
start_stanza: start-stop-daemon --start -u coolapp --exec /usr/bin/authbind coolapp start

Add files to ./files directory

Any files needed by your application can be uploaded to the services home directory by placing them in ./files. This is useful for config files, or anything else that your application needs to run.

Run

This playbook is single host safe, you must include a user and host with the --extra-vars option.

# ansible-playbook node-upstart.yml --ask-sudo-pass --extra-vars "host=some.hosname user=bob"

Roadmap

  • Install specified Nodejs version.
  • Add additional granularity to upstart .conf creation

Example Application

This playbook contains files and configuration to setup and run PaperElectron/Sundry with authbind.

About

Playbook to update and deploy a node application with upstart.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published