Installing and running without Docker

If you are not yet ready for Docker, you can run an GLAMkit project directly. You will need to install and configure all of its dependencies manually.

0. Install prerequisites (once per machine)

Install development tools

Install development tools. On OS X, install the XCode command line tools:

xcode-select --install

Install GLAMkit system dependencies

This section describes how to install the required system packages:

  • PostgreSQL
  • Elasticsearch 2.x
  • git-secret
  • md5sum
  • Nginx
  • NPM
  • Pipe Viewer
  • Python 2.7
  • Redis
  • zlib

Database

GLAMkit requires a PostgreSQL database. On OS X, we recommend Postgres.app. It is easy to install, start, stop, and upgrade.

We recommend that you configure Postgres to start automatically, using Postgres.app’s preferences pane.

Alternatively, you can install Postgres using Homebrew with brew install postgres. Follow the instructions to configure Postgres to start automatically.

Homebrew

The rest can be installed with Homebrew. Elastic search

2.4 is keg-only so must be force-linked:

$ brew install [email protected] git-secret md5sha1sum nginx npm pv python redis
$ brew link [email protected] --force

You may want to use launchd to start these services and restart them at login:

$ brew services start elasticsearch
$ brew services start redis

zlib needs to be installed from the dupes repository and force linked:

$ brew tap homebrew/dupes
$ brew install zlib
$ brew link zlib --force

You need to configure Elasticsearch and Redis to start automatically, or start them manually before you start the project.

Install Bower

npm install -g bower

Tip

Repairing installation after an OS X upgrade

If you experience errors running ./go.sh after an upgrade to OS X try installing Xcode command-line tools:

xcode-select --install

You may also need to re-install system packages.

1. Create a new project

$ bash <(curl -Ls https://raw.githubusercontent.com/ic-labs/django-icekit/master/startproject.sh) {project_name}

This will create a new project from the GLAMkit project template, in a directory named {project_name} in the current working directory.

NOTE: Windows users should run this command in Git Bash, which comes with Git for Windows.

Installing the develop branch

The curl command installs the latest release (from the master branch). If you prefer to install the development release (the develop branch), use this:

$ bash <(curl -Ls https://raw.githubusercontent.com/ic-labs/django-icekit/develop/startproject.sh) {project_name} develop

The above command differs from the normal one in two ways. First, it downloads (via curl) the develop version of the script, and second it passes a second argument (“develop”) to the script, which tells it to download the develop versions of all the files it needs when it runs.

2. Run the project

Change to the GLAMkit project template (or a GLAMkit project) directory:

$ cd project_template

Open a shell with the environment appropriately configured (dependencies updated, database set up):

$ ./go.sh

(After installing, you can skip installing dependencies and migrations and head directly to a shell with ./go.sh bash.)

Create a superuser account:

$ manage.py createsuperuser

Run the Django dev server:

$ runserver.sh

3. That’s it!

Open the site in a browser:

http://{ my_project }.lvh.me:8000

When you’re done, exit runserver.sh.