Skip to content

Go HTTP service to deploy Node.js apps from GitHub

License

Notifications You must be signed in to change notification settings

ecomclub/simple-ci

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 

Repository files navigation

simple-ci

Go HTTP service to deploy Node.js apps (Systemd services) from GitHub

Environment variables

Configure the service with following env variables:

Variable Sample
LOG_FILE /var/log/app.out
APPS_ROOT /var/apps/
SERVICES_PREFIX node-
TCP_PORT :30000

Endpoint

http://localhost:3000/?AppName=myapp&GitBranch=master&Secret=SuperSecretPassword

Proxy

You should use a proxy server (Nginx) and handle this request from a simpler URL, eg.:

https://myserver.com/myapp/deploy
# nginx.conf
location ~ ^\/(?<app>[a-z0-9-]+)\/deploy$ {
  proxy_pass http://[::1]:3000/?Secret=SuperSecretPassword&AppName=$app&GitBranch=master;
}

GitHub setup

The simplest way to get it running is creating a webhook on GitHub repository after releases (recommended) or pushes, using the same Secret passed by proxy:

Releases

No releases published

Packages

No packages published

Languages