notalentgeek

Nyx README

Jul 28th, 2020
231
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.12 KB | None | 0 0
  1. # Nyx
  2.  
  3. Nyx are Google PubSub Subscription Consumer, Consume from certain topic
  4. and later hit XMLRPC to another server(service).
  5.  
  6. ## Installation
  7.  
  8. put google credentials in creds directory.
  9. set all listed environment credential see Below Section.
  10. using docker:
  11.  
  12. `docker-compose up --build`
  13.  
  14. ## Environment Variables
  15.  
  16. Environments variables:
  17.  
  18. | Env Name | Description |
  19. | ----------- | ----------- |
  20. | CREDS_FILENAME | Google credential filename. format file ".json" |
  21. | GOOGLE_APPLICATION_CREDENTIALS | FULL PATH location of Google credentials file in .json |
  22. | NYX_PROJECT_ID | Google Cloud Project ID |
  23. | NYX_SUBSCRIPTION_ID | Google PubSub subscription ID e.g `NYX_SUBSCRIPTION_INVOICE` |
  24.  
  25. Create .env file and put these lines. Change to the actual values:
  26.  
  27. ```env
  28. export CREDS_FILENAME=<<CREDENTIAL FILENAME>>
  29. export NYX_PROJECT_ID=<<PROJECT_ID_IN_GOOGLE_CLOUD>>
  30. export NYX_SUBSCRIPTION_<<NAME>>=<<SUBSCRIPTION_ID>>
  31. export GOOGLE_APPLICATION_CREDENTIALS=<<FULL_PATH_OF_CREDENTIAL_FILENAME>>
  32. ```
  33.  
  34. To activate, run this command:
  35.  
  36. ```console
  37. source .env
  38. ```
  39.  
  40. ## Usage
Advertisement
Add Comment
Please, Sign In to add comment