Git Product home page Git Product logo

objective8's Introduction

Objective[8]

Build Status

A D-CENT project: an application for crowd sourcing and drafting policy.

Development VM

You can develop and run the application in a VM to ensure that the correct versions of Objective[8]'s dependencies are installed. You will need VirtualBox, Vagrant and Ansible installed.

First, clone the repository.

Navigate to the ops/ directory of the project and run:

vagrant up development

The first time this is run, it will provision and configure a new VM.

When the VM has started, access the virtual machine by running:

vagrant ssh

The source folder will be located at /var/objective8.

After initial setup, navigate to the source directory and apply the migrations:

cd /var/objective8
grunt build
lein ragtime migrate

Running the tests

To run all tests, use this command:

lein test

Commands and aliases can be found in the project.clj file.

Designing in the browser

This allows you to rapidly design. You can create jade, modify the sass and js. These will all be live reloaded.

grunt design

Open your browser at http://192.168.50.50:2345/_routes to access it from outside the vagrant box.

Adding or updating a translation resource

Resources for translating the site into different languages are located under: /resources/translations/.csv

To start translating into a new locale, or to update translations for an existing locale, there is a helper leiningen task that copies keys from the default en.csv template into a new or existing templates for other locales. This can be run using:

lein translation-template <locale-identifier> [& <locale-identifier>]

For example:

lein translation-template es el

will generate or update /resources/translations/es.csv and /resources/translations/el.csv.

Running the app

Add any environment variables you want to use to the start_app_vm.sh script.

To start the app, run:

lein start

Go to localhost:8080 to test in development

And then inside the REPL run this for a fake twitter sign-in:

(reset :stub-twitter)

or this for the normal sign-in options:

(reset :default)

Deployment

To deploy using Docker, see here.

To deploy to an Ubuntu server using Ansible, see here.

To deploy to Heroku, see here.

objective8's People

Contributors

cjcheshire avatar aewelch avatar biaspro avatar sarrionandia avatar guykoth avatar lucetzer avatar jkammer avatar duncanmortimer avatar gtrogers avatar natalieesk avatar nicolaguo avatar clarematthews avatar ctford avatar ian-leggett avatar johnpuddephatt avatar matlabzombie avatar erdwolf avatar datamineruk avatar elrob avatar cronopioelectronico avatar

Stargazers

Keyth M Citizen  avatar tomguim avatar  avatar Jiří Podhorecký avatar florent avatar shyam32 avatar Vic avatar  avatar Jeremy Malcolm avatar Luke James Todd avatar Tobias Clemson avatar Jacob Tadesse avatar Arindam avatar Jusore『ジュソレ』 avatar SteveX avatar

Watchers

Róbert Viðar Bjarnason avatar Jaromil avatar Juha Yrjölä avatar Sander van der Waal avatar James Cloos avatar  avatar  avatar  avatar  avatar Samuel Rinnetmäki avatar  avatar Jaakko Korhonen avatar Jaya Klara Brekke avatar Fli.* avatar  avatar Chris Yeoward avatar  avatar Luke James Todd avatar

objective8's Issues

removing admins on config changes

Currently the admin accounts in Objective8 will persist if they are removed from the config and the app restarted, since they are stored in the database.

Preferred behaviour is that any admin profiles who's ids are not on the list of admin ids in the config file should be removed from the database before the new admin accounts are added. This is so that admin accounts can be easily removed if need be

Finalising Drafts

Add a functionality to finalise drafts in objective8. This should disable further draft submission, should include some sort of visual identification to tell that an objective is complete, and should disable most if not all further comments/questions being added to the objective. It should however preserve the page such that users can still see it.

  1. Add a button for policy writers only to upload a final policy
  2. Add a link to the final policy in the Objective's navigation bar
  3. Default to showing the final policy
  4. Final policy should not be interactable
  5. Maintain "Compare with final draft" button

Twitter gateway timeout bug

Sometimes when users attempt to sign in with twitter it fails and they are shown a gateway timeout error. We don't know why or how this happens, and have found no pattern between occurrences. It just happens sometimes

Would be good to fix it

Problem with docker deploy

Hello, I have a problem with Docker deployment. When I run the containers the port 8080/tcp rejects connections. nginx message is '502 Bad Gateway'.

The log says:

root@objective8:~# docker logs 019bd7ae2c12
2016/05/16 14:46:06 [error] 6#6: *1 connect() failed (111: Connection refused) while connecting to upstream, client: 10.0.0.25, server: objective8.podemos.info, request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:8080/", host: "objective8.podemos.info"
2016/05/16 14:46:06 [error] 6#6: *1 connect() failed (111: Connection refused) while connecting to upstream, client: 10.0.0.25, server: objective8.podemos.info, request: "GET / HTTP/1.1", upstream: "http://[::1]:8080/", host: "objective8.podemos.info"
10.0.0.25 - - [16/May/2016:14:46:06 +0000] "GET / HTTP/1.1" 502 575 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.102 Safari/537.36"
2016/05/16 14:46:06 [error] 6#6: *4 no live upstreams while connecting to upstream, client: 10.0.0.25, server: objective8.podemos.info, request: "GET /favicon.ico HTTP/1.1", upstream: "http://localhost/favicon.ico", host: "objective8.podemos.info", referrer: "https://objective8.podemos.info/"
10.0.0.25 - - [16/May/2016:14:46:06 +0000] "GET /favicon.ico HTTP/1.1" 502 575 "https://objective8.podemos.info/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.102 Safari/537.36"
2016/05/16 14:48:47 [error] 6#6: *5 connect() failed (111: Connection refused) while connecting to upstream, client: 10.0.0.25, server: objective8.podemos.info, request: "GET / HTTP/1.1", upstream: "http://[::1]:8080/", host: "objective8.podemos.info"
2016/05/16 14:48:47 [error] 6#6: *5 connect() failed (111: Connection refused) while connecting to upstream, client: 10.0.0.25, server: objective8.podemos.info, request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:8080/", host: "objective8.podemos.info"
10.0.0.25 - - [16/May/2016:14:48:47 +0000] "GET / HTTP/1.1" 502 575 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.102 Safari/537.36"
2016/05/16 14:48:47 [error] 6#6: *8 no live upstreams while connecting to upstream, client: 10.0.0.25, server: objective8.podemos.info, request: "GET /favicon.ico HTTP/1.1", upstream: "http://localhost/favicon.ico", host: "objective8.podemos.info", referrer: "https://objective8.podemos.info/"
10.0.0.25 - - [16/May/2016:14:48:47 +0000] "GET /favicon.ico HTTP/1.1" 502 575 "https://objective8.podemos.info/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.102 Safari/537.36"

And these are the ports that are open, it seems that there is nothing listening on port 7000/tcp:

root@objective8:~# netstat -tanup
Conexiones activas de Internet (servidores y establecidos)
Proto Recib Enviad Dirección local Dirección remota Estado PID/Program name
tcp 0 0 0.0.0.0:22 0.0.0.0:* ESCUCHAR 559/sshd
tcp 0 428 10.0.0.53:22 79.145.114.4:49811 ESTABLECIDO 4135/1
tcp6 0 0 :::80 :::* ESCUCHAR 2964/docker-proxy
tcp6 0 0 :::8080 :::* ESCUCHAR 2775/docker-proxy
tcp6 0 0 :::8081 :::* ESCUCHAR 2767/docker-proxy
tcp6 0 0 :::22 :::* ESCUCHAR 559/sshd
tcp6 0 0 :::443 :::* ESCUCHAR 2956/docker-proxy
tcp6 0 0 127.0.0.1:8080 127.0.0.1:42795 TIME_WAIT -
udp 0 0 0.0.0.0:68 0.0.0.0:* 504/dhclient
udp 0 0 0.0.0.0:38119 0.0.0.0:* 504/dhclient
udp6 0 0 :::58940

What can I be doing wrong to launch the service?

Thanks

Add a language toggle

Objective8 should have a language toggle so that users can change the language to differ from the language that their browser runs in.

This toggle should be visible on all pages, and should use a cookie to set the language if the user is not logged in, or should add a variable to the user's profile if they are logged in.

These variables should be preferentially used by the translations that are already implemented, before defaulting back to the browser's language if they are not set

Remove trailing slashes

application uri etc is frequently used within the application. Within the application there should be checks to ensure that there are no extra slashes added, by ensuring that the base uri given in the config is trimmed to remove a trailing slash.

Share profile picture

Objective8 has placeholders for user's to have profile pictures. These profile pictures should be pulled from the userinfo endpoint of whichever SSO the user is using.

There should also be functionality to sync the user's profile picture with their current profile picture, in the event that they change their image.

Failure on Import the NodeSource GPG key into apt

Deploying on Ubuntu 14.04 is now impossible as the nodesource gpg can't be imported because default python version doesn't support sni.

This is exactly what's described in nodesource/ansible-nodejs-role#33

There there are several solutions proposed. The easiest one is to replace the add nodesource apt-key task in the dev role for:

- name: Import the NodeSource GPG key into apt
  apt_key:
   id: 68576280
   url: "https://keyserver.ubuntu.com/pks/lookup?op=get&fingerprint=on&search=0x1655A0AB68576280"   

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.