Skip to content

Commit

Permalink
Use systemd and show spec info
Browse files Browse the repository at this point in the history
  • Loading branch information
willnode committed Aug 19, 2023
1 parent 28a2fab commit c2937da
Show file tree
Hide file tree
Showing 13 changed files with 139 additions and 3,593 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/domcloud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,20 @@ jobs:
webhook_secret: ${{ secrets.WEBHOOK_SECRET_SGA }}
webhook_auth: ${{ secrets.WEBHOOK_AUTH_SGA }}
data: >-
{"commands":["git pull","npx pm2 restart all"]}
{"commands":["git pull","/bin/systemctl restart bridge"]}
- name: Invoke NYC deployment hook
uses: distributhor/workflow-webhook@v2
env:
webhook_url: https://my.domcloud.co/api/githubdeploy
webhook_secret: ${{ secrets.WEBHOOK_SECRET_NYC }}
webhook_auth: ${{ secrets.WEBHOOK_AUTH_NYC }}
data: >-
{"commands":["git pull","npx pm2 restart all"]}
{"commands":["git pull","/bin/systemctl restart bridge"]}
- name: Invoke FRA deployment hook
uses: distributhor/workflow-webhook@v2
env:
webhook_url: https://my.domcloud.co/api/githubdeploy
webhook_secret: ${{ secrets.WEBHOOK_SECRET_FRA }}
webhook_auth: ${{ secrets.WEBHOOK_AUTH_FRA }}
data: >-
{"commands":["git pull","npx pm2 restart all"]}
{"commands":["git pull","/bin/systemctl restart bridge"]}
13 changes: 1 addition & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,4 @@ This service is used to control a server booted with DOM Cloud Instance. It's ac

To understand DOM Cloud servers architecture, read it on [DOM Cloud docs](https://domcloud.co/docs/features/).

To setup a VM from stratch and set up this service in that VM, see https://github.com/domcloud/container.

## Self Installation

1. `git clone https://github.com/domcloud/bridge/ .`
2. Run init script `sh ./tools-init.sh`
3. Paste the final message to root user (so `sudoutil.js` can be run as root)
4. `npx pm2 start app.js && npx pm2 save`
5. Paste the final message to root user (so the app.js can be run as system daemon)
6. Put `tools-init.nginx.conf` to NGINX config. Adjust accordingly.

Note: You can't put this service under Phusion Passenger because it will be killed during NginX reconfiguration so please use instruction above to run it under `pm2`.
To setup a VM from stratch and set up this service in that VM, see [Self hosting](https://domcloud.co/docs/integration/self-host). You'll see that this service is need to run as a Systemd service.
Loading

0 comments on commit c2937da

Please sign in to comment.