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
Help with setting up production. #193
Comments
Hi, Did you installed all requirements? You can check via console
0 means, exist |
channels is installed. I encounter another issue now. Here are my docker file and .env. I am running into issue with the worker service. Not sure what it does. Really appreciate your help, your project is very interesting and can help many people in my university if this come into production. Here is the error log.
|
change in your env |
Can you show me how to configure worker service? And why do we need it? New to this project so not sure where to look for that information |
uhh, its a lot. This is not done in some minutes... First of all, please check if you installed all requirements on your server environment
Second, your project is working on local? Configure a project is not possible without all files. And Im not the best to configure it. I can check my configuration and share, but this is NOT tested and approved for bootcamp. May you need additional settings. |
I am spinning up the service using docker compose. The local deployment work fine but production.yml is a totally different thing. I involve redis, daphne, postgres. If you have a docker-compose file handy somewhere, please share. Thanks
Get Outlook for iOS<https://aka.ms/o0ukef>
…________________________________
From: samazaphikel <notifications@github.com>
Sent: Thursday, October 17, 2019 5:03:30 PM
To: vitorfs/bootcamp <bootcamp@noreply.github.com>
Cc: Tri Minh Pham <phamminhtris@outlook.com>; Author <author@noreply.github.com>
Subject: Re: [vitorfs/bootcamp] Help with setting up production. (#193)
uhh, its a lot. This is not done in some minutes...
First of all, please check if you installed all requirements on your server environment
pip install -U -r requirements/production.txt
Second, your project is working on local?
Configure a project is not possible without all files. And Im not the best to configure it. I can check my configuration and share, but this is NOT tested and approved for bootcamp. May you need additional settings.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#193?email_source=notifications&email_token=ADEK4AB5JEUP5LQ4APTJ6ITQPDOLFA5CNFSM4JB4YOCKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEBRVI2A#issuecomment-543380584>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ADEK4ADBCG24WLWIT3IM6OLQPDOLFANCNFSM4JB4YOCA>.
|
In my case, IM using python 3.7.1 on Ubuntu server machine Optional set-up Python version With this command, python 3.7.1 is my first priority First, install enviroment on the machine
create env installl gunicorn go back to pages directory
And install the requirements If you use different dabases or something, start migration and collectsstatic Update firewall to allow port 8000 create gunicorn wsgi create a system socket
create a service
enable everything check it Check status check service When you dont see htnl code, something with the gunicorn.service make sure the service is running When is all fine, next step NGinx pass to gunicorn create a site in nginx
save and copy this file to sites-enabled and check nginx setup
In case of no errors, restart nginx add nginx firewall ports, but first delete the port 8000 from testing
add nginx |
Hi @phamminhtris I'm glad you are using the project, and than you find it useful. There are two main ways to deploy the project to a production environment. The first one would be using Docker, but it has its caveats, and obviously it requires a fair amount of familiarity with Docker and The other way is to implement the project as it is, which is "easier" (or at least you can find more resources and guides to deploy it), just remember to load your |
Is it enough to just use gunicorn as the only server? I saw some of the feature required an ASGI application server like daphne to serve web socket traffic. Please correct me if I am wrong. Thank you for you kind help. Really appreciate that. |
Nginx is where requests from the internet arrive first. It can handle them very quickly, and is usually configured to only let those requests through, which really need to arrive at your web application. Gunicorn translates requests which it gets from Nginx into a format which your web application can handle, and makes sure that your code is executed when needed. Each can do something, which the other can’t. Take care of domain name routing (decides where requests should go, or if an error response is in order) Gunicorn Gunicorn is highly optimized and has a lot of convenient features. Running a pool of worker processes/threads (executing your code!) |
I understand the above. However, this project is quite special in term of protocol. It serve notification via websocket and to my understanding we will need more than a regular gunicorn and nginx to drive the app? When I run the local docker compose, I notice that /notifications does not seems to work. I know that I am asking a lot but really appreciate your time and effort to help me @samazaphikel. Will try the local configuration (no docker-compose, docker) just bare ubuntu and see if that works. Thanks y'all |
Very helpful guide. Closing. |
Hi I am trying to spin up Bootcamp as a social network for researchers within my University. However, due to some constraints, I currently cannot use caddy as reverse proxy for deployment. Instead I use nginx. If possible, can you give me some guidance of what parameters I need to specify for production environment. I saw the env.example file but since the project is new to me, I don't know how everything connect to each other. I am stuck with the following error
Any help is appreciated.
The text was updated successfully, but these errors were encountered: