Quick How-To Reference Guide

Set up your local machine with your Gondor credentials

To let Gondor know who you are, you'll need to set up a .gondor file in your home directory with the structure:

username = <username>
key = <key>

where the username and key are those used for this website. Your key can be found in your account. You'll want to make sure your ~/.gondor file is chmod 600 so no one else can see your key.

Create a new site

Just go to the Sites tab and click Create a site. You will be prompted for the name of the site.

Then, inside your Django project directory (i.e. the same level as settings.py) run:

gondor init <site_key>

Create a new dev instance

Inside your Django project directory, run:

gondor create <instance_label>

Deploy to an instance

Inside your Django project directory, run:

gondor deploy <instance_label> <git_ref|mercurial_revision>

Add another user to a site

Go to the site page and click add a new user. You will be prompted for the username of the user and the role they are to have for that site.

Running one-off processes

You can run one-off processes with gondor run. For example, to invoke the Python shell, you'd run:

gondor run <instance_label> python

The acceptable arguments after <instance_label> are anything that is found in your virtual enviroment bin directory.

Django users can pass manage.py to invoke management commands of their project:

gondor run <instance_label> manage.py shell

Putting instance in maintenance mode

There might be times when you would like to control when your instance is in maintenance mode explicitly. Gondor will do it for you when deploying and errors on the side of keeping it up until a deployment succeeds. This means if there is an error deploying after maintenance mode is set it will remain that way.

To control the state of your instance maintenance, you can run:

gondor manage <instance_label> maintenance [on|off]

Custom domain names

If you want to point your own domain to your instance you can do so. On a site or instance detail page (linked to from your dashboard) you can set a custom domain name. Once set you will need to configure your DNS server to point to the right place.

  • For top-level domains; use an A record pointing to the IP <instance_ref>.gondor.co resolves to.
  • For sub-domains; use a CNAME pointing to <instance_ref>.gondor.co

If you need any help please email us at support@gondor.io.