Package: bureaucrat
TheProcfile&Deployfileprocess manager for Python Virtual
Environments.Bureaucrat provides support forDeployfilebased deployment task
management. ADeployfileis basically aProcfileby another name. It
is used to define the deployment commands for your project and spawn the
processes required to run it.Deployfilecommands must be idempotent.If you’re usingDockerthen you might find this
useful to automate your container builds.InstallationInstall fromPyPIwith:pip install bureaucratOr install from source with:pip install git+https://github.com/adlibre/python-bureaucrat.git#egg=bureaucratConfigTo use Bureaucrat you will need to create aProcfile,
Deployfile and.envfile in your virtual env root.SampleProcfileThe following will spawn a single gunicorn web process.web: gunicorn project.wsgi:application --workers $WORKERS --log-file $LOGFILE --bind 0.0.0.0:$PORT --timeout 300SampleDeployfileThe following is suitable for deploying a Django application.pip: pip install -r requirements.txt
migrate: manage.py migrate --noinput
collectstatic: manage.py collectstatic --noinputSample.envWORKERS=4
LOGFILE=/var/log/django-project.log
PORT=8000UsageBasic options arestart,stop,restart,deployandinit.usage: Bureaucrat [-h] {start,stop,restart,deploy,init} ...

Bureaucrat - the Procfile & Deployfile manager for Python Virtual Environments

positional arguments:
  {start,stop,restart,deploy,init}
    start               Starts Procfile processes
    stop                Stops Procfile processes
    restart             Restarts Procfile processes
    deploy              Run tasks in Deployfile
    init                Run Deployfile tasks and then start Procfile processes
                        in foreground

optional arguments:
  -h, --help            show this help message and exitStart / Stop / Restart ArgumentsAdditional arguments for specifying a custom location forProcfile,.envand log files.usage: Bureaucrat start [-h] [--venv VENV] [--app APP] [--procfile PROCFILE]
                        [--envfile ENVFILE] [--logpath LOGPATH]
                        [--pidpath PIDPATH]
                        [process [process ...]]

positional arguments:
  process              Procfile Process Name

optional arguments:
  -h, --help           show this help message and exit
  --venv VENV          Virtualenv root
  --app APP            Application root
  --procfile PROCFILE  Procfile path
  --envfile ENVFILE    .env file path
  --logpath LOGPATH    log file path
  --pidpath PIDPATH    pid file pathExample:$ bureaucrat start
Spawning web: gunicorn project.wsgi:application --log-file log/gunicorn.$LOGFILE --bind unix:run/gunicorn.sockDeploy Argumentsusage: Bureaucrat deploy [-h] [--venv VENV] [--app APP]
                         [--deployfile DEPLOYFILE] [--envfile ENVFILE]
                         [--logpath LOGPATH]

optional arguments:
  -h, --help            show this help message and exit
  --venv VENV           Virtualenv root
  --app APP             Application root
  --deployfile DEPLOYFILE
                        Deployfile path
  --envfile ENVFILE     .env file path
  --logpath LOGPATH     log file pathExample:$ bureaucrat deploy
Running task syncdb: manage.py syncdb --noinput
Running task migrate: manage.py migrate --noinput
Running task collectstatic: manage.py collectstatic --noinputStatusThis used byPanuboto support Python
environments.