Skip to content

Deploying Janeway on Reclaim Hosting

Andy Byers edited this page Mar 19, 2018 · 14 revisions

This guide assumes you are following it continuously and does not repeat things like activating the virtualenvironment. If you stop following this guide half way through you may need to do so again.

  1. Setup your account with reclaim hosting (https://reclaimhosting.com/)
  2. Login to your Reclaim account over SSH
  3. Clone Janeway using the command git clone https://github.com/BirkbeckCTP/janeway.git
  4. Login to your Reclaim Cpanel and select Setup Python App
  5. Create a new python app using python version 3.5 similar to below (note: I cloned janeway into a folder called jw, if you cloned it directly it would be janeway/src):
  6. After you have saved your new python app, edit the WSGI file location so it looks like /home/janewayuser/jw/src/core/wsgi.py then press restart.
  7. Copy the "command for entering virtual environment" and paste this into your terminal to activate virtualenv. If this command has worked you will see (jw/src:3.6) or similar before your username in the terminal like below:
  8. Move into the janeway folder cd jw/
  9. Next we need to install requirements, we run pip3 install -r requirements.txt
  10. Now we need to create a MySQL database for Janeway to use. Reclaim has an interface for this, create a new database (remember the name you use) and then create and add a privileged user.
  11. Move into the src folder cd src/
  12. Copy exmample_settings to settings cp core/example_settings.py core/settings.py
  13. Edit the settings file and update the database credentials using the user and database you created above:
DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.mysql',
        'NAME': 'martindev_jw',
        'USER': 'martindev_jw',
        'PASSWORD': 'the+password_you-created',
        'HOST': 'localhost',
        'PORT': '3306',
        'OPTIONS': {'init_command': 'SET default_storage_engine=INNODB'},
    }
}
  1. You should also set DEFAULT_HOST = 'https://www.example.org' to whatever the base host you used in the Python App setup was, for us that was anoterdemo.janeway.systems so DEFAULT_HOST = 'https://anotherdemo.janeway.systems'
  2. Open PHPMyAdmin from the cpanel menu, select the database you created and press the Operations button in the menu. Update the collation to utf8_general_ci
  3. From inside jw/src/ run python3 manage.py install_janeway to begin the installation process.
  4. We now need to add symbolic links for the static assets, you will need to move into the root directory of the subdomain you are using, this can be found on the Subdomains page. The command looks like: ln -s ~/jw/src/collected-static/ static
  5. Open the install page as requested at the end of the install process.
  6. You should deploy Lets Encrypt certs for your subdomains to ensure they are secure.

Wiki has moved to read the docs.

Clone this wiki locally