django-deployment

How do I add authentication and endpoint to Django Celery Flower Monitoring?

白昼怎懂夜的黑 提交于 2019-12-03 10:38:23
I've been using flower locally and it seems easy enough to setup and run, but I can't see how I would set it up in a production environment. In particular, how can I add authentication and how would I define a url to access it? For custom address, use the --address flag. For auth, use the --basic_auth flag. See below: # celery flower --help Usage: /usr/local/bin/celery [OPTIONS] Options: --address run on the given address --auth regexp of emails to grant access --basic_auth colon separated user-password to enable basic auth --broker_api inspect broker e.g. http://guest:guest@localhost:15672

Django app deployment not loading static files

青春壹個敷衍的年華 提交于 2019-12-01 10:59:21
I have a django app which has angular and bootstrap. This is how my settings are defined: # Django settings for studentsite project. import os PROJECT_DIR = os.path.dirname(__file__) DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = ( # ('Your Name', 'your_email@example.com'), ) MANAGERS = ADMINS DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql_psycopg2', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'. 'NAME': 'texascompletesdb', # Or path to database file if using sqlite3. # The following settings are not used with sqlite3: 'USER': 'postgres', 'PASSWORD': 'password'

Django Gunicorn not load static files

[亡魂溺海] 提交于 2019-11-28 12:07:23
i'm trying to deploy my django project with gunicorn and nginx, but i need some help. when i code gunicorn myproject.wsgi:application I manage to see my website in the localhost page but without any css. Why gunicorn does not load my css files that are into the static folder of my project? Guinicorn_start script: https://dpaste.de/TAc4 Gunicorn output: https://dpaste.de/C6YX aldo_vw Gunicorn will only serve the dynamic content, i.e. the Django files. So you need to setup a proxy server such as nginx to handle the static content (your CSS files). I assume you are starting Gunicorn the right way