Skip to main content

RTMIS Installation Guide

Installation Guide

Below step is for self-host or on-prem installation process. Please follow Developer-Guide to setup the development mode.

System Requirements

Application Server

  • System Memory: 4 GiB
  • CPU: 2 GHz Dual Core Processor
  • Storage: 25 GiB or more Disk
  • Operating System: Ubuntu Server 22.04 - x86_64 (AMD/Intel)
  • IP: 1 public IP (plus 1 private IP if the database server in private IP)

Database Server

  • System Memory: 4 GiB
  • CPU: 2 GHz Dual Core Processor
  • Storage: 25 GiB or more Disk
  • Operating System: Ubuntu Server 22.04 - x86_64 (AMD/Intel)
  • IP: 1 private or public IP

Prerequisite

  • Domain: Domain or Subdomain which pointed to the server's public IP
  • Docker Engine: 20.10 or above
  • Git: 2.39 or above
  • 3rd Party Service Providers:
    • Mailjet
    • Sentry

Preparation

Note: The following guide is an example installation on Ubuntu and Debian based systems. You need the above depedencies installed both on Application Server and Database Server. If you do not have it, please see the following installation guide to get it.

Install Docker Engine

  1. Update the apt package index and install packages to allow apt to use a repository over HTTPS:

    sudo apt update sudo apt install ca-certificates curl gnupg lsb-release
    
  2. Add Docker’s official GPG key:

    sudo mkdir -p /etc/apt/keyrings curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
    
  3. Use the following command to set up the repository:

    echo "deb \[arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg\] https://download.docker.com/linux/ubuntu $(lsb\_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
    
  4. Update the apt package index:

    sudo apt update
    
  5. Install Docker Engine, containerd, and Docker Compose.

    sudo apt-get install docker-ce docker-ce-cli containerd.io docker-compose
    
  6. Manage Docker as a non-root user.

    sudo groupadd docker
    sudo usermod -aG docker $USER
    newgrp docker
    

Install Git Version Control

The RTMIS uses git as version control. Therefore it is better to install git to make it easier to retrieve updates instead download the repository zip.

sudo apt install git

Install Database Server

Install Application Server

Execure below commands on server who allocated for application server.

Clone the Repository

git clone https://github.com/akvo/rtmis

Environment Variable Setup

Install text editor to be able to edit .env file

sudo apt install nano

or

sudo apt install vim

Go to the repository directory, then edit the environment

cd rtmis
vim .env

Example Environment:

DB_HOST=<<your postgresql ip>>
DB_PASSWORD=<<your postgresql password>>
DB_SCHEMA=<<your rtmis schema name>>
DB_USER=<<your rtmis db user>>
DEBUG="False"
DJANGO_SECRET=local-secret
MAILJET_APIKEY=
MAILJET_SECRET=
WEBDOMAIN=<<your exposed domain url>>
APK_UPLOAD_SECRET=<<your apk upload secret>>
STORAGE_PATH="./storage"
SENTRY_MOBILE_ENV="<<your sentry env>>"
SENTRY_MOBILE_DSN="<<your_sentry_mobile_DSN>>"
SENTRY_MOBILE_AUTH_TOKEN="<<your_sentry_mobile_auth_token>>"

Run the Application

docker compose up -d