Skip to content

GOK-NPHL/nic_pt

Repository files navigation

NIC COVID PT

Table of Contents
  1. About The Project
  2. Getting Started
  3. License

About The Project

The NIC COVID PT .

Getting Started

This project is powered by the laravel framework.

Prerequisites

  1. Install docker and docker-compose on your local machine.

Installation

  • clone project

    git clone https://github.com/GOK-NPHL/rtri_pc.git
  • cd

    cd rtri_pt/

Edit the the .evn file and update with needed parameters like your ODK username and password, database connection, and set the SESSION_DOMAIN to the relevant server domain.

Check the defaults on the docker files for the db and nginx ports.

  • build project

    docker-compose build
  • run project

    docker-compose up -d

If you get the error

Version in "./docker-compose.yml" is unsupported

Uninstall your docker & docker compose installation and update to the latest.

eg on Ubuntu:

sudo apt unistall docker-compose

Once the containers are up and running, you can check status by running docker container list, you need to finalize set up.

Run below to get into the app continer session:

sudo docker-compose exec  app bash

you could add -u 0 get into the sudo session in the container.

Next install required dependencies for the application as below:

npm install  && composer install

Once that is done, we set up the database with initial data.

php artisan migrate

and

php artisan db:seed

We then set up a cron entry for period download of ODK submission files. add below entry to /etc/crontab file.

* * * * *       root    cd /var/www/ && /usr/local/bin/php artisan fetchodkdata > /var/log/cron.log 2>&1

finally, we compile our fron end resources for prodcution:

npm run prod

Defaults.

Database, web server and PHP settings are done from the docker files.

License

Distributed under the GPL-3.0 License. See LICENSE for more information.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published