Installing and running¶
The recommended installation method uses Docker. Docker works on OS X, Linux, and Windows, takes care of all the project dependencies (e.g. database, search engine, web server, etc.), and makes Deploying your site easy.
If you’re not ready to use Docker, see Manual Installation.
Otherwise, if you haven’t already, install Docker.
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¶
Build a Docker image:
$ cd {project_name}
$ docker-compose build --pull
Run a django
container and all of its dependencies:
$ docker-compose run --rm --service-ports django
This will give you a shell inside the Docker container. Create a superuser account:
bash$ manage.py createsuperuser
Run the Django dev server:
bash$ runserver.sh
3. That’s it!¶
Open the site in a browser:
http://{ my_project }.lvh.me:8000
When you’re done, exit the container and stop all of its dependencies:
bash$ exit
$ docker-compose stop