/unep-wcmc.org

The unep-wcmc.org website

Primary LanguageHTML

# UNEP WCMC - Company website

## Notes

### Intro

A brochure website for UNEP WCMC that is built on Comfy Mexican Sofa.

### History

Early 2017 - The new design has been built on top of the old site so the repo contains both new and legacy code. March 2017 - Updated the functionality of the filters on the Resources and Data page. Each resource now has its own page.

### Team

  • UX/Design - Michel

  • Developer - Spencer

  • Supporting developers - Stacy, Andrea

### Tech

  • SCSS

  • No front end framework

  • Comfy Mexican Sofa

  • Ruby 2.2.2

  • Rails 4.2.5.2

### Browser support

  • Lastest Chrome, Firefox, Safari

  • IE11 upwards

  • Samsung Galaxy A3

## Local development

bundle install
mv config/database.yml.example config/database.yml
rake db:create
rake db:migrate

Previously you would do this:

rake db:migrate
rake db:seed
HOSTNAME="localhost:3000" rake unepwcmc:setup

Amend HOSTNAME as required and provide your database settings in database.yml

Another path is to get a dump of the database and to import that into PostgreSQL. Now simply run:

rails s

Note that most of the images are uploaded via Comfortable Mexican Sofa, which at it’s current version doesn’t support exporting and importing files. If you need the images, acquire an archive of the public folder from the beta and copy the files into your local app.

You will need to have PostgreSQL and ImageMagick installed.

Configuration: secrets.yml & .env

We use the secrets.yml file to store configuration. Any sensitive information (particularly in staging & production environments) should not be included directly in that file, but via a reference to an environment variable defined on the target machine. We use .env files (via the dotenv gem) to store the environment variable.

Email

You will need to provide mailer connection details in the secrets.yml / .env file.

MaxMind

You will need to provide locations of the MaxMind DB in the secrets.yml / .env file.

The GeoIP.dat file can be found here: Dropbox/Informatics/MaxMind_IP/GeoIP/GeoIP.dat

Exception notifications

You will need to configure email / slack notifications in the secrets.yml / .env file.

## Remote sites

## Staging

## Live

## Troubleshooting

  1. open ssl issues when installing eventmachine ‘brew install openssl` then `gem install eventmachine -v 1.0.8 – –with-cppflags=-I/usr/local/opt/openssl/include`