Skip to content

Instantly share code, notes, and snippets.

@darshitvvora
Created May 5, 2020 08:16
Show Gist options
  • Select an option

  • Save darshitvvora/a474e9950f67861e9792ddee5d7643b8 to your computer and use it in GitHub Desktop.

Select an option

Save darshitvvora/a474e9950f67861e9792ddee5d7643b8 to your computer and use it in GitHub Desktop.
Basic Node Server Deployment
Welcome to the Sample API wiki!
1. Starting NodeJS Project with Angular FullStack
2. Configuring Git
3. Setup DB
4. Setup Solr
5. Setup Hooks
6. Setup Staging Server
7. Setup Production Server
7. Setup Continuous Integration
JS Coding Standards: https://github.com/wearehive/project-guidelines
```
# rmq 5672 and 15672 runs on nginx
# elasticsearch port 9200 - runs with nginx
# kibana port 5601 - runs with nginx
# minio port `on demand` or 9000 runs on nginx
# ci port 9998: runs on nginx -
```sh
{
"port": 9998,
"path": "/build",
"secret": "YORSECRET",
"log": "/home/gloryque/quezx/ci/logs/access.log",
"rules": [
{
"event": "push",
"match": "ref == 'refs/heads/staging' && repository.name == 'app' && sender.login != 'admin'",
"exec": "cd /home/user/repo/app && /home/user/repo/ci/app-staging.sh >> /home/user/repo/ci/logs/app.log"
},
{
"event": "push",
"match": "ref == 'refs/heads/staging' && repository.name == 'chat' && sender.login != 'admin'",
"exec": "cd /home/user/repo/chat && /home/user/repo/ci/chat-staging.sh >> /home/user/app/ci/logs/chat.log"
}
]
}
```
# webhooks port 9999: runs on nginx -
```
{
"port": 9999,
"path": "/hitme",
"secret": "dfdfdsfsdfsd",
"log": "/home/user/repo/webhooks/logs/access.log",
"rules": [
{
"event": "push",
"match": "ref == 'refs/heads/master' && repository.name == 'api.dist'",
"exec": "ssh app 'cd /home/user/repo/api.dist; git reset --hard; git remote update origin; git checkout master; git pull origin staging; npm install --production; kill -HUP $(/usr/sbin/lsof -i:3009 -t)'"
}
]
}
```
http://blog.inching.org/PHP/2017-05-01-php-nginx-centos7-phpMyAdmin.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment