This is a example Django project that utilises Bureaucrat for initialisation.
It is also ready to deploy in the Python-Bureaucrat Docker container.
docker build -t example .
docker run -t -i -e SECRET_KEY=foo -e WORKERS=4 -e LOGFILE=/srv/log/foo.log -e PORT=8000 example
Create a virtual environment. Python Bootstrap is a handy tool for this.
Clone this repo to the base of your newly created virtual environment.
After entering the virtual environment. Run the following:
pip install bureaucrat
cp .env.example .env # edit as required
bureaucrat init
Running bureaucrat init
will run the deployment steps, and start the app.
Optionally: Add the following to bin/activate:
OLDIFS=$IFS; IFS=$'\n'; for l in $(cat $VIRTUAL_ENV/.env); do eval export echo $l; done; IFS=$OLDIFS
This will automatically load the .env settings when entering the virtual environment. Which makes it easier to manually run ./manage.py.