Git Product home page Git Product logo

e-petitions's Introduction

Petitions

This is the code base for the UK Government's petitions service (https://petition.parliament.uk). We have open sourced the code for you to use under the terms of licence contained in this repository.

We hope you enjoy it!

A few things to know:

  • You will need ruby 2.2.2
  • You will need PostgreSQL and Memcached

Set up your development environment

  • Clone the repo to your local machine
  • Install postgres. Easiest with homebrew using brew install postgres
    • If you like you can add postgres to your LaunchAgent. Follow instructions at end of console output
  • Set up your dev and test databases
    • $ psql postgres
    • # CREATE DATABASE epets_development;
    • # CREATE DATABASE epets_test;
    • # CREATE USER epets;
    • # GRANT all privileges ON database epets_development TO epets;
    • # GRANT all privileges ON database epets_test TO epets;
    • # ALTER USER epets WITH PASSWORD 'replace_me';
    • # \q to quit
  • You will need to set up the config/database.yml. Copy what is in config/database.example.yml and add the password you used earlier for the epets postgres user
  • $ rake db:structure:load - load the sql structure into your new databases

Run the app

  • rails s

Other info

  • If you want jobs (like emails) to be run, use $ rake jobs:work
  • For setting up a sysadmin user
    • rake epets:add_sysadmin_user - to set up an admin user with email '[email protected]' and password 'Letmein1!'
    • go to /admin and log in. You will be asked to change your password. Remember, the password must contain a mix of upper and lower case letters, numbers and special characters.

e-petitions's People

Contributors

pixeltrix avatar h-lame avatar alanth avatar alexander-bobin avatar davidbasalla avatar otlaitil avatar mybits avatar oskarpearson avatar ansonk avatar leandroalemao avatar jamiecobbett avatar tomski avatar om-sharma avatar charlieegan3 avatar heathd avatar kushalp avatar mattbostock avatar rooreynolds avatar richardjpope avatar

Watchers

Partikelir avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.