keiffster / program-y

Python 3.x based AIML 2.0 Chatbot interpreter, framework, related programs and knowledge files
https://keiffster.github.io/program-y/
Other
348 stars 138 forks source link

Facebook Client integration with cloud #207

Closed ObaydaAlesawi closed 5 years ago

ObaydaAlesawi commented 5 years ago

Hi, thanks for developing this awesome program. I'm using it for a graduation project with facebook on a local server and it's working perfectly however the only problem is when I upload it to a platform or cloud(like heroku), and I'm don't really know how to run the client to connect with facebook. I tried to create a custom script by copying the facebook client and edit some code, modifying the 'args.py' file and assigning default values to it, but I don't know how to give the it values in the cloud. Do you have any idea on how you could help with this? And thank you very much for your all your amazing effort. Your time is most appreciated.

keiffster commented 5 years ago

The Facebook client requires no modification to run on any cloud based service. I have had it running on AWS and Azure. The AWS client runs 24 hrs a day

You can read how to install on amazon lightsail cloud instance in the installation on the wiki

The issues you will have are

A) make sure the port the client runs on is exposed via your cloud firewall

B) you client needs to be running as a daemon on Linux or it will shut down when you close your console

Can you provide a little bit more detail of exactly what you have done

Which cloud service are you running on How did you install program-y How did you install y-bot What exactly is not working for you

Regards

Keith keith@keithsterling.com 07771 597630

On 4 May 2019, at 13:50, Obayda Alesawi notifications@github.com wrote:

Hi, thanks for developing this awesome program. I'm using it for a graduation project with facebook on a local server and it's working perfectly however the only problem is when I upload it to a platform or cloud(like heroku), and I'm don't really know how to run the client to connect with facebook. I tried to create a custom script by copying the facebook client and edit some code, modifying the 'args.py' file and assigning default values to it, but I don't know how to give the it values in the cloud. Do you have any idea on how you could help with this? And thank you very much for your all your amazing effort. Your time is most appreciated.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

ObaydaAlesawi commented 5 years ago

I'm using "heroku" cloud system, what i need is to run the client file as a python script,without using the "sh" file,but I don't know how to add the configuration files as default

keiffster commented 5 years ago

Heroku is not a platform I have used. I took a look st the docs and it seems the biggest problems is loading command line params and then all of the config and storage files

I’ll take a more detailed look over the coming days but it won’t be something I can add within the next few weeks

If you need a cloud service before then, then I would suggest looking at something like AWS Lightsail or similar native Ubuntu instance

K

ObaydaAlesawi commented 5 years ago

That's my problem, so is there a way to load the configuration files from the class, not using the command line parms ? Thanks

motazsaad commented 5 years ago

Hi Keith,

I am using Linux vps and I am trying to run facebook client using gunicorn because I want to link it with nginx and enable https. The script that I use to run is python3 -m programy.clients.restful.flask.facebook.client --config ../../config/xnix/config.facebook.yaml --cformat yaml --logging ../../config/xnix/logging.yaml

My question is: is there any way to make it run with gunicorn?

Thanks in advance :) Motaz

keiffster commented 5 years ago

You don’t need Gunicorn to enable Nginx and https, my Facebook client runs live using Nginx to flask and uses https

If you look at the documentation and install instructions for Linux you’ll see details on how to do this

Regards

Keith 07771 597630

On 1 Aug 2019, at 17:49, Motaz Saad notifications@github.com wrote:

Hi Keith,

I am using Linux vps and I am trying to run facebook client using gunicorn because I want to link it with nginx and enable https. The script that I use to run is python3 -m programy.clients.restful.flask.facebook.client --config ../../config/xnix/config.facebook.yaml --cformat yaml --logging ../../config/xnix/logging.yaml

My question is: is there any way to make it run with gunicorn?

Thanks in advance :) Motaz

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.