Coder Social home page Coder Social logo

photographer's Introduction

http://blog.smalleycreative.com/tutorials/setup-a-django-vm-with-vagrant-virtualbox-and-chef/

Initial setup of Vagrant Base

If it's a new project ->

Copy vagrantfile and /binfolder Install Pip and Django Install latest version of node.js install bower + bootstrap

If not, download source from GitHub

vagrant up

...Insert password

This step only ever needs to be done once. Once the precise64 box is installed on a system the remaining steps refer to that same box regardless of the project.

On an Apple running OS X, download and install Xcode from the Apple App Store. This is necessary to get some compilers and install Git on the host machine.

Download VirtualBox from http://www.virtualbox.org/wiki/Downloads, install the package.

Download Vagrant 2 or higher from http://downloads.vagrantup.com/, install the package.

Launch a Terminal window, check that it installed:

(host) $ which vagrant

Add a Vagrant box (we'll be using Ubuntu Precise Pangolin (12.04 LTS) 64-bit):

(host) $ vagrant box add precise64 http://files.vagrantup.com/precise64.box

Using Vagrant with This Project

Make a directory for the project and change to it, replacing <path_to> with the path to the project and <project_name> with the name of the project.

(host) $ mkdir <path_to>/<project_name> && cd $_

For example, to create a project called 'website' in your home directory:

(host) $ mkdir ~/website && cd $_

When you're all done, this directory will match up with /vagrant/ in the virtual environment. VirtualBox keeps the two directories in sync so changes to one will be made in the other.

Clone the repo, replacing <path_to_repo> with the clone URL of the repo.

(host) $ git clone <path_to_repo>

Startup Vagrant and provision the Virtual Machine.

(host) $ vagrant up

SSH in to the Virtual Machine.

(host) $ vagrant ssh

Install the project-specific packages.

(vm) sudo pip install -r requirements/development.txt

Sync the database and migrate any migrations.

(vm) $ dj syncdb
(vm) $ dj migrate

Force compile the stylesheets (first time only).

(vm) $ compass compile myproject/static_media/stylesheets --force

Smoke Test

(vm) $ frs

Open a Web browser and navigate to http://localhost:8000. You should see the home.html template rendered.

Full Documentation

This project is a derivative of django-newproj-template and uses the Gesso frontend framework.

photographer's People

Stargazers

Athul Krishnan avatar

Watchers

Everardo J. Barojas M. avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.