Skip to content
This repository has been archived by the owner on May 27, 2022. It is now read-only.

covid-preservar/preservar-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Preserva Backend

Maintainability

Links uteis

Website Url
Trello https://trello.com/b/zpQaUrDr/preserva
Figma https://www.figma.com/proto/dvBM9mvf85fpcEg8zp8tCh/Preservar?node-id=2725%3A1&viewport=453%2C523%2C0.125&scaling=scale-down-width

Requirements

  • Ruby 2.6.5
  • PostgreSQL 12
  • Memcache
  • Redis
  • libmaxminddb

Environment file

Copy .env.example file in the root of repository to .env and set the various environment variables needed to function.

Seeds

seeds.rb is meant for DB seeds that will be used in production. For seeding the DB for development, use the populate.rake task.

GeoLite Database

IP Lookup uses the free GeoLite2 database. The heroku deployment has a buildpack to ensure the latest version and to keep the large file out of the repository.

When setting up your local environment, download the database from here, unzip and place the .mmdb file in the vendor folder.

Procfile and Procfile.dev

TL;DR: Run foreman start in one terminal and rails server in another.

Since foreman doesn't play too well with breakpoints, it's best to run rails server separately from the rest of the processes (postgres, memcache, redis and worker)

However, Heroku uses Procfile to determine process formation, but in Heroku we only need web and worker processes, so we have a Procfile for use in Heroku and Procfile.dev to be used locally.

The .foreman file should make foreman automatically pick up Procfile.dev instead of Procfile.