Skip to content

Instantly share code, notes, and snippets.

@t-io
Forked from alextucker/README.md
Last active May 7, 2017 22:01

Revisions

  1. t-io renamed this gist Jan 10, 2014. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  2. @alextucker alextucker renamed this gist Aug 21, 2013. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  3. @alextucker alextucker renamed this gist Aug 21, 2013. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  4. @alextucker alextucker renamed this gist Aug 21, 2013. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  5. @alextucker alextucker revised this gist Aug 21, 2013. 1 changed file with 6 additions and 0 deletions.
    6 changes: 6 additions & 0 deletions gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -92,3 +92,9 @@ for file in /app/.profile.d/*; do source $file; done
    hash -r
    cd /app # This is the folder where django app got deployed
    ```

    Now you can run your manage.py commands

    ```bash
    python manage.py syncdb
    ```
  6. @alextucker alextucker revised this gist Aug 21, 2013. 1 changed file with 8 additions and 0 deletions.
    8 changes: 8 additions & 0 deletions gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -84,3 +84,11 @@ docker images # See a listing of all of your docker images
    docker run -i -t app/myapp /bin/bash # Start an interactive terminal inside of your container
    ```

    Now we need to bootstrap our terminal session with all of the correct paths and environment variables.

    ```bash
    export HOME=/app
    for file in /app/.profile.d/*; do source $file; done
    hash -r
    cd /app # This is the folder where django app got deployed
    ```
  7. @alextucker alextucker revised this gist Aug 21, 2013. 1 changed file with 6 additions and 1 deletion.
    7 changes: 6 additions & 1 deletion gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -77,5 +77,10 @@ git push dokku master
    Running manage.py commands
    --------------------------

    This is the only hacky part of the process.
    This is the only hacky part of the process. From inside your Droplet, lets a terminal session inside our container

    ```bash
    docker images # See a listing of all of your docker images
    docker run -i -t app/myapp /bin/bash # Start an interactive terminal inside of your container
    ```

  8. @alextucker alextucker revised this gist Aug 21, 2013. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -72,7 +72,7 @@ git remote add dokku [email protected]:myapp
    git push dokku master
    ```

    ## OMG! You can now visit your app!
    ### OMG! You can now visit your app!

    Running manage.py commands
    --------------------------
  9. @alextucker alextucker revised this gist Aug 21, 2013. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -72,7 +72,7 @@ git remote add dokku [email protected]:myapp
    git push dokku master
    ```

    OMG! You can now visit your app!
    ## OMG! You can now visit your app!

    Running manage.py commands
    --------------------------
  10. @alextucker alextucker revised this gist Aug 21, 2013. 1 changed file with 9 additions and 1 deletion.
    10 changes: 9 additions & 1 deletion gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -70,4 +70,12 @@ Add a new git remote to your project pointed at your new Postgres container on y
    ```bash
    git remote add dokku [email protected]:myapp
    git push dokku master
    ```
    ```

    OMG! You can now visit your app!

    Running manage.py commands
    --------------------------

    This is the only hacky part of the process.

  11. @alextucker alextucker revised this gist Aug 21, 2013. 1 changed file with 4 additions and 2 deletions.
    6 changes: 4 additions & 2 deletions gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -65,7 +65,9 @@ Dokku uses Heroku's BuildPack system for deploying applications. Refer to [Herok

    I made a quick Django base project based on Heroku's documentation. You can get it [here](https://github.com/alextucker/djangoheroku)

    Add a new git remote to your project pointed at your new Postgres container on your Dokku instance.
    Add a new git remote to your project pointed at your new Postgres container on your Dokku instance then push to it.

    ```bash
    git remote add dokku [email protected]:myapp
    git remote add dokku [email protected]:myapp
    git push dokku master
    ```
  12. @alextucker alextucker revised this gist Aug 21, 2013. 1 changed file with 6 additions and 1 deletion.
    7 changes: 6 additions & 1 deletion gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -63,4 +63,9 @@ Deploy a Django App

    Dokku uses Heroku's BuildPack system for deploying applications. Refer to [Heroku's Django Docs](https://devcenter.heroku.com/articles/django) to figure out how to prepare your app for deployment. This is mainly concerned with Database connection configuration, WSGI configuration and static file serving.

    I made a quick Django base project based on Heroku's documentation. You can get it [here](https://github.com/alextucker/djangoheroku)
    I made a quick Django base project based on Heroku's documentation. You can get it [here](https://github.com/alextucker/djangoheroku)

    Add a new git remote to your project pointed at your new Postgres container on your Dokku instance.

    ```bash
    git remote add dokku [email protected]:myapp
  13. @alextucker alextucker revised this gist Aug 21, 2013. 1 changed file with 3 additions and 1 deletion.
    4 changes: 3 additions & 1 deletion gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -61,4 +61,6 @@ dokku postgresql:create myapp
    Deploy a Django App
    -------------------

    Dokku uses Heroku's BuildPack system for deploying applications. Refer to [Heroku's Django Docs](https://devcenter.heroku.com/articles/django) to figure out how to prepare your app for deployment. This is mainly concerned with Database connection configuration, WSGI configuration and static file serving.
    Dokku uses Heroku's BuildPack system for deploying applications. Refer to [Heroku's Django Docs](https://devcenter.heroku.com/articles/django) to figure out how to prepare your app for deployment. This is mainly concerned with Database connection configuration, WSGI configuration and static file serving.

    I made a quick Django base project based on Heroku's documentation. You can get it [here](https://github.com/alextucker/djangoheroku)
  14. @alextucker alextucker revised this gist Aug 21, 2013. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -61,3 +61,4 @@ dokku postgresql:create myapp
    Deploy a Django App
    -------------------

    Dokku uses Heroku's BuildPack system for deploying applications. Refer to [Heroku's Django Docs](https://devcenter.heroku.com/articles/django) to figure out how to prepare your app for deployment. This is mainly concerned with Database connection configuration, WSGI configuration and static file serving.
  15. @alextucker alextucker revised this gist Aug 21, 2013. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -33,7 +33,7 @@ Install Dokku
    1. SSH into your Droplet. Just `ssh [email protected]` should work if you add an SSH Key. If not, DigitalOcean emailed you a root password.
    2. Copy and Paste and oneline installer from the [Dokku Repo](https://github.com/progrium/dokku) README. Something like this `wget -qO- https://raw.github.com/progrium/dokku/master/bootstrap.sh | sudo bash`
    3. Wait 5 minutes.
    4. Associate an SSH key with a git user as the installer instruct you to. Something like this `cat ~/.ssh/id_rsa.pub | ssh root@annoy.io "gitreceive upload-key alex"`
    4. Associate an SSH key with a git user as the installer instruct you to. Something like this `cat ~/.ssh/id_rsa.pub | ssh root@yourdomain.com "gitreceive upload-key alex"`
    5. Add domain to `VHOST`

    ```bash
  16. @alextucker alextucker revised this gist Aug 21, 2013. 1 changed file with 11 additions and 1 deletion.
    12 changes: 11 additions & 1 deletion gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -34,6 +34,12 @@ Install Dokku
    2. Copy and Paste and oneline installer from the [Dokku Repo](https://github.com/progrium/dokku) README. Something like this `wget -qO- https://raw.github.com/progrium/dokku/master/bootstrap.sh | sudo bash`
    3. Wait 5 minutes.
    4. Associate an SSH key with a git user as the installer instruct you to. Something like this `cat ~/.ssh/id_rsa.pub | ssh [email protected] "gitreceive upload-key alex"`
    5. Add domain to `VHOST`

    ```bash
    cd /home/git
    echo yourdomain.com >> VHOST
    ```

    Install Dokku Postgres Plugin
    -----------------------------
    @@ -50,4 +56,8 @@ Create a new container which contains Postgres. We are going to deploy our Djang

    ```bash
    dokku postgresql:create myapp
    ```
    ```

    Deploy a Django App
    -------------------

  17. @alextucker alextucker revised this gist Aug 21, 2013. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -46,7 +46,7 @@ git clone https://github.com/Kloadut/dokku-pg-plugin
    dokku plugins-install
    ```

    Create a new container which contains Postgres.
    Create a new container which contains Postgres. We are going to deploy our Django app to this container in the future.

    ```bash
    dokku postgresql:create myapp
  18. @alextucker alextucker revised this gist Aug 21, 2013. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -43,7 +43,7 @@ Install the Postres Plugin. From inside your Droplet:
    ```bash
    cd /var/lib/dokku/plugins
    git clone https://github.com/Kloadut/dokku-pg-plugin
    dokku plugins install
    dokku plugins-install
    ```

    Create a new container which contains Postgres.
  19. @alextucker alextucker revised this gist Aug 21, 2013. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -48,6 +48,6 @@ dokku plugins install

    Create a new container which contains Postgres.

    ```
    ```bash
    dokku postgresql:create myapp
    ```
  20. @alextucker alextucker revised this gist Aug 21, 2013. 1 changed file with 3 additions and 2 deletions.
    5 changes: 3 additions & 2 deletions gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -38,9 +38,9 @@ Install Dokku
    Install Dokku Postgres Plugin
    -----------------------------

    Install the Postres Plugin
    Install the Postres Plugin. From inside your Droplet:

    ```
    ```bash
    cd /var/lib/dokku/plugins
    git clone https://github.com/Kloadut/dokku-pg-plugin
    dokku plugins install
    @@ -49,4 +49,5 @@ dokku plugins install
    Create a new container which contains Postgres.

    ```
    ```
  21. @alextucker alextucker revised this gist Aug 21, 2013. 1 changed file with 17 additions and 3 deletions.
    20 changes: 17 additions & 3 deletions gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -3,11 +3,12 @@ Deploying Django on Dokku

    This Gist: http://is.gd/dokkudjango


    DigitalOcean: https://www.digitalocean.com/

    Dokku: https://github.com/progrium/dokku

    DigitalOcean: https://www.digitalocean.com/
    Dokku-Postgres: https://github.com/Kloadut/dokku-pg-plugin


    Deploy a Droplet on DigitalOcean
    --------------------------------
    @@ -35,4 +36,17 @@ Install Dokku
    4. Associate an SSH key with a git user as the installer instruct you to. Something like this `cat ~/.ssh/id_rsa.pub | ssh [email protected] "gitreceive upload-key alex"`

    Install Dokku Postgres Plugin
    -----------------------------
    -----------------------------

    Install the Postres Plugin

    ```
    cd /var/lib/dokku/plugins
    git clone https://github.com/Kloadut/dokku-pg-plugin
    dokku plugins install
    ```

    Create a new container which contains Postgres.

    ```
    ```
  22. @alextucker alextucker revised this gist Aug 21, 2013. 1 changed file with 7 additions and 2 deletions.
    9 changes: 7 additions & 2 deletions gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,9 @@
    Deploying Django on Dokku
    =========================

    Link: http://is.gd/dokkudjango
    This Gist: http://is.gd/dokkudjango



    Dokku: https://github.com/progrium/dokku

    @@ -30,4 +32,7 @@ Install Dokku
    1. SSH into your Droplet. Just `ssh [email protected]` should work if you add an SSH Key. If not, DigitalOcean emailed you a root password.
    2. Copy and Paste and oneline installer from the [Dokku Repo](https://github.com/progrium/dokku) README. Something like this `wget -qO- https://raw.github.com/progrium/dokku/master/bootstrap.sh | sudo bash`
    3. Wait 5 minutes.
    4. Associate an SSH key with a git user as the installer instruct you to. Something like this `cat ~/.ssh/id_rsa.pub | ssh [email protected] "gitreceive upload-key alex"`
    4. Associate an SSH key with a git user as the installer instruct you to. Something like this `cat ~/.ssh/id_rsa.pub | ssh [email protected] "gitreceive upload-key alex"`

    Install Dokku Postgres Plugin
    -----------------------------
  23. @alextucker alextucker revised this gist Aug 21, 2013. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -29,4 +29,5 @@ Install Dokku

    1. SSH into your Droplet. Just `ssh [email protected]` should work if you add an SSH Key. If not, DigitalOcean emailed you a root password.
    2. Copy and Paste and oneline installer from the [Dokku Repo](https://github.com/progrium/dokku) README. Something like this `wget -qO- https://raw.github.com/progrium/dokku/master/bootstrap.sh | sudo bash`
    3. Wait 5 minutes.
    3. Wait 5 minutes.
    4. Associate an SSH key with a git user as the installer instruct you to. Something like this `cat ~/.ssh/id_rsa.pub | ssh [email protected] "gitreceive upload-key alex"`
  24. @alextucker alextucker revised this gist Aug 21, 2013. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -29,4 +29,4 @@ Install Dokku

    1. SSH into your Droplet. Just `ssh [email protected]` should work if you add an SSH Key. If not, DigitalOcean emailed you a root password.
    2. Copy and Paste and oneline installer from the [Dokku Repo](https://github.com/progrium/dokku) README. Something like this `wget -qO- https://raw.github.com/progrium/dokku/master/bootstrap.sh | sudo bash`
    3. Wait 5 minutes. :beer:
    3. Wait 5 minutes.
  25. @alextucker alextucker revised this gist Aug 21, 2013. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -28,4 +28,5 @@ Install Dokku
    -------------

    1. SSH into your Droplet. Just `ssh [email protected]` should work if you add an SSH Key. If not, DigitalOcean emailed you a root password.
    2. Copy and Paste and oneline installer from the [Dokku Repo](https://github.com/progrium/dokku) README. Something like this `wget -qO- https://raw.github.com/progrium/dokku/master/bootstrap.sh | sudo bash`
    2. Copy and Paste and oneline installer from the [Dokku Repo](https://github.com/progrium/dokku) README. Something like this `wget -qO- https://raw.github.com/progrium/dokku/master/bootstrap.sh | sudo bash`
    3. Wait 5 minutes. :beer:
  26. @alextucker alextucker revised this gist Aug 21, 2013. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -28,4 +28,4 @@ Install Dokku
    -------------

    1. SSH into your Droplet. Just `ssh [email protected]` should work if you add an SSH Key. If not, DigitalOcean emailed you a root password.
    2. Copy and Paste and oneline installer from the [Dokku Repo](https://github.com/progrium/dokku) README.
    2. Copy and Paste and oneline installer from the [Dokku Repo](https://github.com/progrium/dokku) README. Something like this `wget -qO- https://raw.github.com/progrium/dokku/master/bootstrap.sh | sudo bash`
  27. @alextucker alextucker revised this gist Aug 21, 2013. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -27,4 +27,5 @@ Setup DNS
    Install Dokku
    -------------

    1. SSH into your Droplet. Just `ssh [email protected]` should work if you add an SSH Key. If not, DigitalOcean emailed you a root password.
    1. SSH into your Droplet. Just `ssh [email protected]` should work if you add an SSH Key. If not, DigitalOcean emailed you a root password.
    2. Copy and Paste and oneline installer from the [Dokku Repo](https://github.com/progrium/dokku) README.
  28. @alextucker alextucker revised this gist Aug 21, 2013. 1 changed file with 4 additions and 0 deletions.
    4 changes: 4 additions & 0 deletions gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -24,3 +24,7 @@ Setup DNS
    1. Add a blank A Record pointing to the IP Address of your new Droplet
    2. Add a wildcard (*) A Record pointing to the same domain to capture all of the subdomains.

    Install Dokku
    -------------

    1. SSH into your Droplet. Just `ssh [email protected]` should work if you add an SSH Key. If not, DigitalOcean emailed you a root password.
  29. @alextucker alextucker revised this gist Aug 21, 2013. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -4,6 +4,7 @@ Deploying Django on Dokku
    Link: http://is.gd/dokkudjango

    Dokku: https://github.com/progrium/dokku

    DigitalOcean: https://www.digitalocean.com/

    Deploy a Droplet on DigitalOcean
    @@ -16,7 +17,6 @@ Add an SSH key to DigitalOcean before hand to make SSHing into you new box easie
    3. Select Ubuntu 13.04 x64 as the Image
    4. Select your SSH key
    5. Click "Create Droplet"
    6.

    Setup DNS
    ---------
  30. @alextucker alextucker revised this gist Aug 21, 2013. 1 changed file with 9 additions and 1 deletion.
    10 changes: 9 additions & 1 deletion gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -15,4 +15,12 @@ Add an SSH key to DigitalOcean before hand to make SSHing into you new box easie
    2. Enter hostname, select size and region
    3. Select Ubuntu 13.04 x64 as the Image
    4. Select your SSH key
    5. Click "Create Droplet"
    5. Click "Create Droplet"
    6.

    Setup DNS
    ---------

    1. Add a blank A Record pointing to the IP Address of your new Droplet
    2. Add a wildcard (*) A Record pointing to the same domain to capture all of the subdomains.