Skip to content

Implementation of provider infrastructure: NAT Traversing / Centrifuge

License

Notifications You must be signed in to change notification settings

GEO-Protocol/gns-provider-centrifuge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


Overview

This repository is part of GNS ecosystem.
It provides infrastructure component for the providers, that allows NAT traversing [todo: add link to specs] for some categories of mobile users.



Deployment

Requirements

Installation

  1. cd <target directory>
  2. git clone https://github.com/GEO-Protocol/gns_provider_centrifuge.git ./
  3. virtualenv -p /usr/bin/python3.5 venv
  4. source venv/bin/activate
  5. [optional] pip install pip --upgrade
  6. pip install -r requirements.txt
  7. Edit conf.json according to your environment. (nano conf.json)
  8. Run centrifuge python server.py
Example of conf.json
{
  "asserts": true,
  "debug": false,
  "host": "0.0.0.0",
  "port": 9000,
  "redis": {
    "host": "127.0.0.1",
    "port": 6379,
    "db": 0
  },
  "use_centrifuge": true
}

Systemd service

It is recommended to run the server as a systemd service to automatically reload it in case of any failure.

Example of systemd.service
[Unit]
Description=GNS Centrifuge Instance
After=network.target
StartLimitBurst=5
StartLimitIntervalSec=10

[Service]
Type=simple
Restart=always
RestartSec=5
User=<user>
ExecStart=/<___destination dir___>/venv/bin/python /<___destination dir___>/server.py 
WorkingDirectory=/<___destination dir___>/

About

Implementation of provider infrastructure: NAT Traversing / Centrifuge

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages