Skip to content

Latest commit

 

History

History
42 lines (30 loc) · 1.07 KB

README.md

File metadata and controls

42 lines (30 loc) · 1.07 KB

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: