<commit_before># Deploying to Dokku
This template was tested successfully on [Digital Ocean](https://digitalocean.com) with Dokku 0.4.5 on Ubuntu 14.04.    

First make sure you have a PostgreSQL plugin installed on your Dokku VPS
```sh
$ dokku plugin:install https://github.com/Kloadut/dokku-pg-plugin postgresql
```

Optional alias to run all commands client side.    
Add this to start up script, e.g .bash_profile or .bashrc.
```
alias dokku="ssh -t root@{{ cookiecutter.dokku_server }} dokku"
```

### Deploying to Dokku 
Git (Client side)
```sh
$ cd {{ cookiecutter.repo_name }}
$ git init && git add -A && git commit -m "First commit"
$ git remote add dokku dokku@{{ cookiecutter.dokku_server }}:{{ cookiecutter.repo_name }}
```

Create app, database and set environment variables (Server side)
```sh
$ dokku apps:create {{ cookiecutter.repo_name }}
$ dokku postgresql:create {{ cookiecutter.repo_name }}
$ dokku config:set {{ cookiecutter.repo_name }} DJANGO_SECRET_KEY=`openssl rand -base64 32`
$ dokku config:set {{ cookiecutter.repo_name }} DJANGO_SETTINGS_MODULE='config.settings.production'
$ dokku postgresql:link {{ cookiecutter.repo_name }} {{ cookiecutter.repo_name }}
```

Push repository to Dokku (Client side)
```sh
$ git push dokku master
```

Migrate and create super user (Server side)
```sh
$ dokku run {{ cookiecutter.repo_name }} python manage.py migrate
$ dokku run {{ cookiecutter.repo_name }} python manage.py createsuperuser
```

Viewing logs on Dokku (Server side)
```sh
$ docker ps
$ docker attach <CONTAINER ID>
```
<commit_msg>Change docs for dokku 0.4.5<commit_after># Deploying to Dokku
This template was tested successfully on [Digital Ocean](https://digitalocean.com) with Dokku 0.4.5 on Ubuntu 14.04.    

First make sure you have a PostgreSQL plugin installed on your Dokku VPS
```sh
$ dokku plugin:install https://github.com/dokku/dokku-postgres.git
```

Optional alias to run all commands client side.    
Add this to start up script, e.g .bash_profile or .bashrc.
```
alias dokku="ssh -t root@{{ cookiecutter.dokku_server }} dokku"
```

### Deploying to Dokku 
Git (Client side)
```sh
$ cd {{ cookiecutter.repo_name }}
$ git init && git add -A && git commit -m "First commit"
$ git remote add dokku dokku@{{ cookiecutter.dokku_server }}:{{ cookiecutter.repo_name }}
```

Create app, database and set environment variables (Server side)
```sh
$ dokku apps:create {{ cookiecutter.repo_name }}
$ dokku postgres:create {{ cookiecutter.repo_name }}-database
$ dokku config:set {{ cookiecutter.repo_name }} DJANGO_SECRET_KEY=`openssl rand -base64 32`
$ dokku config:set {{ cookiecutter.repo_name }} DJANGO_SETTINGS_MODULE='config.settings.production'
$ dokku postgres:link {{ cookiecutter.repo_name }}-databse {{ cookiecutter.repo_name }}
```

Push repository to Dokku (Client side)
```sh
$ git push dokku master
```

Migrate and create super user (Server side)
```sh
$ dokku run {{ cookiecutter.repo_name }} python manage.py migrate
$ dokku run {{ cookiecutter.repo_name }} python manage.py createsuperuser
```

Viewing logs on Dokku (Server side)
```sh
$ docker ps
$ docker attach <CONTAINER ID>
```

{'fraction_non_alphanumeric': 0.12488053520229372, 'fraction_numerical': 0.00796431984708506, 'mean_word_length': 4.902255639097745, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6714320', 'n_tokens_mistral': 1096, 'n_tokens_neox': 1049, 'n_words': 327}