Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add guide for other config vars #13

Closed
LuminarySage opened this issue Aug 4, 2022 · 14 comments
Closed

Add guide for other config vars #13

LuminarySage opened this issue Aug 4, 2022 · 14 comments

Comments

@LuminarySage
Copy link

I'm mostly concerning these two that are required
image

@karafra
Copy link
Owner

karafra commented Aug 4, 2022

Hey

What guide would you like for these vars (I know this sounds stupid, but I would like your to hear your input in this matter)

@LuminarySage
Copy link
Author

Just how to get them/set them up because they're required and I have no idea what they are for and I don't even know what AMQP is

@karafra
Copy link
Owner

karafra commented Aug 4, 2022

Oh, okay. I will add that in the next release.

Did you manage to get it set up or do you need help?

@LuminarySage
Copy link
Author

LuminarySage commented Aug 4, 2022

I got through the discord bot/app set up and tried to deploy to Heroku with the bot token but is still missing those two required values mentioned above that I don't know how to obtain

@LuminarySage
Copy link
Author

Also I just noticed that you don't need to configure those when you deploy via docker. How come?

Only required variables is TOKEN, this can be set as environment variables using export ENV_NAME=VALUE on linux based OS or $env:VARIABLE_NAME=VALUE on Windows based OS

@karafra
Copy link
Owner

karafra commented Aug 4, 2022

Oh okay

So for the AMQP:

  • small intro into what it is why I bot needs it

    • AMQP is protocol which enables server to instantly queue messages which then can get picked up by client. This is mostly used for CPU intensive tasks where it is used as acknowledgment for client that processing has started or delivery of small client messages such as in instant messaging apps like Instagram or Facebook messenger. This bot uses AMQP as dynamic job queue because if there is large amount of requests being made to image generation models, then messages get blocked so they don't overload server (DDoS/DoS countermeasure)
  • As for filling this environment varble on heroku I strongly advise for usage of Cloud AMQP which is largest AMQP provider and has excellent uptime. You can log into it with github. Once your account is created, you need to create new amqp instance (free plan will completely suffice) by clicking on this button. Screenshot_20220805-003856_Chrome.jpg Then go to instance you created and copy field URL under section AMQP Details . SmartSelect_20220805-003947_Chrome.jpg. Dont worry, this is not the production queue and its details. This is the value you need to insert into required variable named AMQP_URL

For the MongoDb
Small intro into mongodb:

  • MongoDb is widely used NoSql database mostly used for large scale programmes. This was necessary once and decided to add ✉️ feature because it is used for storage of generated collages so they can be sent to end user.
  • For creating your Mongo instance i would advise you to use Mongo Atlas which is native MongoDb provider. You will need to create cluster (free will suffice), once you fill in all required fields for it you will be given popup with credentials. What is important, is that you copy MongoUri field, thi is what you will use in MONGO_URL variable. I will be honest with you, I am on my phone and I am not sure if this variable just pops up. If it doesn't please copy you login credentials and URL on which cluster is hosted. Resulting URI will be I format mongodb://{userName}:{password}@{host}:27017

If there are any inaccuracies or problems, come to my Demo discord server and I will help you as much as I can 🤗

@LuminarySage
Copy link
Author

Thank you so much for the comprehensive guide. I'll set this up and get back to you if I had any question

@LuminarySage
Copy link
Author

Is there a preferred way to configure this? I assume I'd need to get the IP after I started my heroku instance?
image

@karafra
Copy link
Owner

karafra commented Aug 5, 2022

No there is not, and please dont setup IP list as heroku rotates IPs once in 24 hours.

@LuminarySage
Copy link
Author

So I should not set it up at all is what I'm hearing

@LuminarySage
Copy link
Author

I got this error when I built and tried to run on heroku

image

@LuminarySage
Copy link
Author

Maybe it's bc I haven't set this up properly?
image

@karafra
Copy link
Owner

karafra commented Aug 5, 2022

Okay ... i see. Dont want to del with this publically. Do you have discord? If so please write to me there

@karafra
Copy link
Owner

karafra commented Aug 6, 2022

Closing as this was resolved over at discord. Will improve documentation next release ✌️

@karafra karafra closed this as completed Aug 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants