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/CAP5HUWqzyqwcX98BX%2Bx%2BnOZ3kknonL742FsdHmjLD3hCrL3-3Q%40mail.gmail.com.

