Skip to main content

Deploy webapps running behind djaoapp session manager

Project description

This Django app enables a Django project to seamlessly integrate behind the [DjaoDjin HTTP session manager reverse proxy](https://github.com/djaodjin/djaoapp). It will replace the default django.contrib.sessions and AUTHENTICATION_BACKENDS to decode sessions forwarded to your Django project by the HTTP session manager.

[More technical documentation](https://djaodjin.com/docs/technical/)

Install

Install deployutils into your environment

$ pip install djaodjin-deployutils

Create a credentials file that contains the DJAODJIN_SECRET_KEY. (You can also pass DJAODJIN_SECRET_KEY as a shell environment variable.)

$ cat ./credentials # Authentication for djaodjin firewall DJAODJIN_SECRET_KEY = “__your_secret_key__”

(for stand-alone testing) Add the mockup views in urls.py

Development

Clone the repository in a virtualenv and install the prerequisites

$ virtualenv _installTop_ $ cd _installTop_ $ source bin/activate $ git clone https://github.com/djaodjin/djaodjin-deployutils.git $ cd djaodjin-deployutils $ pip install -r testsite/requirements.txt

Create the credentials file with a DJAODJIN_SECRET_KEY and the empty db.

$ make initdb

Run the web application

$ python manage.py runserver

Browse to http://localhost:8000

Bonus commands

Commands to upload/download resources

$ python manage.py download_resources $ python manage.py upload_resources

Not all assets are stored under source control. Images, videos, etc. are better kept outside the git repository. These two commands are used to download the extra resources into the webapp htdocs/ directory from the stage server and upload them from the webapp htdocs/ directory to the stage server respectively.

Commands to setup on deployed servers

$ python manage.py pullapp

Fetch/merge from the remote git repository and downlad the extra resources from the stage server.

Using configuration files from a S3 bucket

$ python manage.py upload_configs –location s3://__example__ credentials site.conf

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

djaodjin-deployutils-0.5.21.tar.gz (40.4 kB view details)

Uploaded Source

File details

Details for the file djaodjin-deployutils-0.5.21.tar.gz.

File metadata

  • Download URL: djaodjin-deployutils-0.5.21.tar.gz
  • Upload date:
  • Size: 40.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.40.0 CPython/3.7.5

File hashes

Hashes for djaodjin-deployutils-0.5.21.tar.gz
Algorithm Hash digest
SHA256 9b3566c4a54835902b396443ec9443fad9124ed9f90c519f9ead6c7eb15465a5
MD5 a46103f2854c9cf76c10d94270fe93ff
BLAKE2b-256 4bf0aaf41875dcc964617097ac689c17655dad1dadeef850d9046ce6fa35d2ad

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page