Hi Rahul,

That right you had a few answer on your previous question, more deeper
perhap you must config reverse proxy connection (tcp sock (ur question)
compatible http)
these are for your custom

https://www.nginx.com/blog/websocket-nginx/?__cf_chl_captcha_tk__=9fc641baf627a1f387f365526786c1929d6228e9-1579534051-0-AQ6HE6aPclHIoe1eXIG58qJDoS8rfLMq6XCSerTbE7DgckT5DZPBe7z03bg-q68-sV0yhL8widMBgAGw8G4rQVAAQZyXbwnOgoiGXirdV1z92FffD_gr342PfSrXFbl-UsEW0vOYeRkvInYe45iSeqG-Ywsp6oxzoE00XcZnQhdRwhZ_nPuT1yoRfmvEA30TB--CWjLH_PN3-Do3Hkj4YSCDoCDulx3TzIfj3oB-n7oGJR86KqcnViZhcZn1r6gAx94Bx0UHzrNV7QStAtWkPex1J5Gp3capZUdwA4qdRPVHQGiiHSaniVjT_PRRiIq6bKVWiEy1nMYt0A0RIs4Aej2LTNy-GrcBsHKXeMuYpE2Z-gocONTNQITbekY5vkK7I10HVaPR-eovREjv8zq-xlg

https://cloud.google.com/appengine/docs/flexible/python/using-websockets-and-session-affinity

>From flex env gcp provided:
https://cloud.google.com/appengine/docs/flexible/

On Mon, Jan 20, 2020, 21:42 Rahul Arora <[email protected]> wrote:

> Thanks but this is not a valid or useful comparison since GAE is a PaaS
> service whereas Nginx is a proxy server. In fact GAE itself uses Nginx
> which is why I'm getting the error from Nginx despite not configuring it
> myself.
>
> Rahul.
>
> On Monday, January 20, 2020 at 3:14:35 PM UTC+8, Integr@te System wrote:
>>
>> Hi Rahu,
>>
>> Plz scrutinize  more info to differ, combine and select right one for
>> your case.
>>
>> https://stackshare.io/stackups/google-app-engine-vs-nginx
>>
>>
>> On Mon, Jan 20, 2020, 12:08 Rahul Arora <[email protected]> wrote:
>>
>>> Thanks for your reply. Is there really no way of using daphne without
>>> altering nginx/supervisord config like we use gunicorn?
>>>
>>> If not, I have some questions based on my efforts so far, please. I will
>>> be grateful for your attention to these. Apologies if they're silly
>>> questions since I'm a beginner:
>>> 1. If I reconfigure nginx and supervisord, how should I make sure the
>>> conf files get picked up by GAE? Should I add something to the app.yaml
>>> file to point to the nginx-app.conf file in the root folder? Should I also
>>> change my runtime declaration to custom, or leave it as python? I find that
>>> whenever I add an nginx-app.conf file in the root folder the build times
>>> out and I get an Error[4] from gcloud app deploy. Otherwise the build
>>> completes fully.
>>> 2. If I am starting a Unix socket for Daphne in the supervisord config
>>> file, what happens to the entrypoint delaration in the ap.yaml file? Do I
>>> delete that?
>>> 3. How do I know what path I should use in the command: "daphne -u /run/
>>> daphne/daphne%(process_num)d.sock". Also, what is process_num?
>>> 4. The new conf files (for nginx and supervisord in the documentation
>>> shared by you) refer to localhost:8000 - should I change this? What is the
>>> TCP socket used by nginx backend?
>>> 5. How can I do things like updating supervisor, "sudo service nginx
>>> reload" etc on the GAE PaaS platform since I'm not operating the instance
>>> directly? Or is this not necessary since I'm creating a whole new build
>>> each time?
>>>
>>> Sorry for the barrage and thanks in advance,
>>> Rahul.
>>>
>>> On Sunday, January 19, 2020 at 1:41:09 PM UTC+8, Integr@te System wrote:
>>>>
>>>> Hi Rahu,
>>>>
>>>> Check chennel_layers setting as a sample in this doc for more helpful
>>>>
>>>> https://channels.readthedocs.io/en/latest/deploying.html
>>>>
>>>>
>>>>
>>>> On Sat, Jan 18, 2020, 21:10 Rahul Arora <[email protected]> wrote:
>>>>
>>>>> Hi all,
>>>>>
>>>>> I'm trying to switch from gunicorn to Daphne for my Django app on GAE
>>>>> Flex, since I need to use Django Channels. Previously the site worked fine
>>>>> with gunicorn as entrypoint (in the app.yaml file). I just replaced it 
>>>>> with
>>>>> daphne so my yamlfile looks like this:
>>>>>
>>>>> runtime: python
>>>>> env: flex
>>>>>
>>>>> runtime_config:
>>>>>   python_version: 3
>>>>>
>>>>> entrypoint: daphne -b 0.0.0.0 -p 8001 my_project_name.asgi:application
>>>>>
>>>>>
>>>>> I've already made a .asgi file next to my .wsgi file and declared an
>>>>> application there.
>>>>>
>>>>> In requirements.txt I've ensured the daphne(2.4.1) and asgiref(3.2.3)
>>>>> packages are the latest versions.
>>>>>
>>>>> Finally when I do 'gcloud app deploy', deployment appears to happen
>>>>> smoothly and in the build logs I can see daphne starting:
>>>>>
>>>>>
>>>>> Step #1: Step 9/9 : CMD exec daphne -b 0.0.0.0 -p 8001 
>>>>> my_project_name.asgi:applicationStep #1:  ---> Running in c6f3762a5ce2
>>>>>
>>>>>
>>>>> But when I go to the site, I'm seeing a 502 Bad Gateway error on the
>>>>> site, with "nginx" in the next line.
>>>>>
>>>>>
>>>>> Is there a way to deploy Daphne without going into nginx configurations 
>>>>> etc? I'm using an app engine only because I wanted to avoid doing 
>>>>> micro-level tweaks on a cloud machine.
>>>>>
>>>>> Thanks,
>>>>> Rahul.
>>>>>
>>>>> --
>>>>> You received this message because you are subscribed to the Google
>>>>> Groups "Django users" group.
>>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>>> an email to [email protected].
>>>>> To view this discussion on the web visit
>>>>> https://groups.google.com/d/msgid/django-users/dfb79af0-663c-4581-8fab-f06d2281d875%40googlegroups.com
>>>>> <https://groups.google.com/d/msgid/django-users/dfb79af0-663c-4581-8fab-f06d2281d875%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>>> .
>>>>>
>>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Django users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to [email protected].
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/663c1f9c-9bdc-4da1-95d6-269c13c6c86b%40googlegroups.com
>>> <https://groups.google.com/d/msgid/django-users/663c1f9c-9bdc-4da1-95d6-269c13c6c86b%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/d3df4fdc-e986-4e1e-a2af-eb11d23f6834%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/d3df4fdc-e986-4e1e-a2af-eb11d23f6834%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAP5HUWp2AWJLPU7fWVcNc%3Dn%3DLWk-rci7YSM0oW0WdNJwGPVDzQ%40mail.gmail.com.

Reply via email to