Proteins, Code & Fashion

  • Archive
  • RSS
  • Ask me anything
Today dolbeau.ca was compared to apple.com in this random stackoverflow question. Very flattering for us all here at Dolbeau HQ.
Pop-upView Separately

Today dolbeau.ca was compared to apple.com in this random stackoverflow question. Very flattering for us all here at Dolbeau HQ.

    • #dolbeau
  • 1 week ago
  • 1
  • Comments
  • Permalink
  • Share
    Tweet
Tie pyramid (Taken with instagram)
Pop-upView Separately

Tie pyramid (Taken with instagram)

  • 1 week ago
  • Comments
  • Permalink
  • Share
    Tweet
Knitting machines (Taken with instagram)
Pop-upView Separately

Knitting machines (Taken with instagram)

  • 2 weeks ago
  • Comments
  • Permalink
  • Share
    Tweet
C’est moi
Pop-upView Separately

C’est moi

Source: proprpostur

  • 2 weeks ago > proprpostur
  • 16
  • Comments
  • Permalink
  • Share
    Tweet
Graph of Dolbeau newsletter subscribers… now all we need is the rest of the hockey stick :)
Pop-upView Separately

Graph of Dolbeau newsletter subscribers… now all we need is the rest of the hockey stick :)

    • #dolbeau
    • #stats
  • 3 weeks ago
  • 1
  • Comments
  • Permalink
  • Share
    Tweet
Sexy Dolbeau multicolor bow tie…. coming soon!
Pop-upView Separately

Sexy Dolbeau multicolor bow tie…. coming soon!

(via dolbeau)

Source: grossnasty

    • #menswear
    • #dolbeau
  • 3 weeks ago > grossnasty
  • 139
  • Comments
  • Permalink
  • Share
    Tweet
Dolbeau website in 3D… courtesy of Firefox.
Pop-upView Separately

Dolbeau website in 3D… courtesy of Firefox.

    • #dolbeau
  • 3 weeks ago
  • 2
  • Comments
  • Permalink
  • Share
    Tweet

Provision & deploy a simple Django stack on Debian 6 using Fabric & Cuisine

Warning: This post is for people who know what Python, Django, and Debian are.

It turns out that most people ever only need a single VPS node (or less) for their Django site. When it comes to small sites, using Chef and Puppet for deployment is kind of overkill. In our previous iteration at Dolbeau I implemented Chef with the Deploy Resource. It worked alright, except for the fact that my deploys took way too long, not to mention it was super overcomplicated and scary when it failed. I wanted to convert my huge ass Chef deployment into a tiny Fabric script (with the help of Cuisine), so I did!

You can find it in a Github repo called deploy-django.

The stack is composed of:

  • Nginx
  • Gunicorn
  • Django
  • Memcached
  • Postgresql

Supervisord is basically optional, but you need to edit the fabfile. Right now I personally just restart guncorn using a kill -HUP during the deploy process. This seems to work fine for my purposes. I’ve included an example init script in the provision folder.

To use the fabfile, you first need to install the requirements:

pip install -r requirements.txt

Then, edit the deploy_settings.py file:

APP_NAME = the name of your python app
APP_REPO = the git repo
APP_REPO_BRANCH = the branch you want to deploy
APP_HOSTS = a list of hosts
REMOTE_USER, REMOTE_GROUP = the linux user that should own the deploy directory on the server

DJANGO_STATIC_ROOT = the directory name of your static_root in your app
DJANGO_MEDIA_ROOT = the directory name of your media_root in your app

DEBIAN_PACKAGES = a list of debian packages to install, the default list contains a bunch of things that you may not need

DEPLOY_TREE = defines the deploy directory tree. The default deploy tree creates a /srv/<APP_NAME> for your app.


DEPLOY_TREE = {
    APP_NAME: {
        'releases': {},
        'shared': {
            'logs': {},
            'media_root': {},
            DJANGO_STATIC_ROOT: {}
        }
    }
}

Then, you edit the server config files in the provision directory. The provision directory is structured as if it is the root directory of your server’s disk and it contains basic config files for your stack. You will need to edit these files (and rename some of them) before trying to deploy, they are NOT templates.

/etc/
    rc.local
    init.d/myapp
    gunicorn/myapp.conf.py
    nginx/
        nginx.conf
        sites-available/myapp
    postgresql/8.4/main/postgresql.conf
    supervisor/conf.d/myapp.conf
/srv/myapp/shared/settings_local.py

Then you can try to initialize, provision and deploy:

fab initialize

This will set up the required user and inject your public ssh-key for passwordless login.

fab provision

This will install the packages and set up the server config files

fab deploy

This will deploy your app!

It should all work… if it doesn’t then feel free to file an issue or fork the repo.

    • #python
    • #django
    • #deploy
    • #geeks
  • 3 weeks ago
  • 2
  • Comments
  • Permalink
  • Share
    Tweet
Photo shoot with spence (Taken with instagram)
Pop-upView Separately

Photo shoot with spence (Taken with instagram)

  • 1 month ago
  • 14
  • Comments
  • Permalink
  • Share
    Tweet
Dolbeau photo shoot! (Taken with instagram)
Pop-upView Separately

Dolbeau photo shoot! (Taken with instagram)

  • 1 month ago
  • 1
  • Comments
  • Permalink
  • Share
    Tweet
← Newer • Older →
Page 1 of 10

Logo

Proteins, Code & Fashion

Yo! I'm David Caplan. I'm a co-founder of Dolbeau, the online mens fashion accessory company. Previously, I studied biochemistry at the University of Toronto. I'm a published scientist, hacker, and player of the occasional song.

Internet

  • @davc on Twitter
  • davecap on github

Twitter

loading tweets…

Following

I Dig These Posts

  • Post via thingsmelissamakes
    New York in Miniature

    I’ve seen this fake tilt-shift effect done a number of times in the past and thought I might attempt it myself,...

    Post via thingsmelissamakes
  • Photoset via xloremipsumx

    If you market something with this line, you better damn deliver (and they did):
    “…and then you realize you’ll never touch anything softer - unless...

    Photoset via xloremipsumx
  • Photo via proprpostur

    Yesterday // Behind The Taylors

    Photo via proprpostur
  • Photo via atouchofheart

    Series of three nesting bowls. The colouring inside is the same as the outside.

    Photo via atouchofheart
See more →
  • RSS
  • Random
  • Archive
  • Ask me anything
  • Mobile

Effector Theme by Carlo Franco.

Powered by Tumblr