Skip to content

Getting started

Torgeir Slette edited this page May 11, 2018 · 3 revisions

Setup

Github

We recommend cloning the repository with SSH (see here for adding SSH key if you haven't already):

git@github.com:IT2901-24-2018/vapi.git
cd vapi

If you wish to contribute to Vapi, we would also appreciate you setting the following configuration options:

git config --global core.autocrlf false
git config --global user.name "<your github username>"
git config --global user.email your.github@email.com

Dependencies

Docker (Compose) will handle most of our dependencies, but first you need to install it! Install the Developer Desktop for Mac or Windows, or the Linux Server for your distribution of choice here.

The Developer Desktop for Mac and Windows already include Docker Compose, but Linux users will have to install Compose here.

Our Django container depends on environment variables. Make a file called .env at the root directory, with the following contents:

DJANGO_DEBUG=True

Initial build

We have a Makefile that simplifies interaction with our Docker containers. You will likely need to use sudo for most Docker commands, but you can omit it depending on your installation.

Start up the application for the first time, building your containers and starting them up by running:

sudo make

Your Postgres container might be slower than the Django container when starting Vapi for the first time, but the server isn't ready yet anyways, so that's hardly an issue. Stop the server with CTRL+C.

Migrations

Get your database up to speed by applying existing migrations:

sudo make migrate

Superuser

Create a superuser in Django:

sudo make superuser

While we plan to remove the need for this in the future, we need to fill in the superuser credentials to the .env file you made earlier. This file will not be checked in to Git. Modify the .env file so that it looks like this, replacing yourusername with your username, and yourpassword with your password:

DJANGO_DEBUG=True
API_USERNAME=yourusername
API_PASSWORD=yourpassword
Clone this wiki locally