Git Product home page Git Product logo

pop-up-archive's Introduction

Stories in Ready

Pop Up Archive

Build Status Dependency Status Coverage Status Code Climate

Ruby Version 2.0.0-p247
Rails Version 3.2.14
Production Deployment [email protected]:pop-up-archive.git - http://pop-up-archive.herokuapp.com

Recommended setup

This guide expects that you have git and homebrew installed, and have a ruby environment set up with 2.0.0-p247 (using RVM or rbenv). We also assume you are using Pow, and have the development site running at http://pop-up-archive.dev. This is not required, but some aspects of the guide may not be appropriate for different configurations.

brew install redis elasticsearch postgres
git clone [email protected]:popuparchive/pop-up-archive.git
curl get.pow.cx | sh
gem install powder bundler
cd pop-up-archive
bundle install
powder link
cp config/env_vars.example config/env_vars

Environment variables

In order to mimic the way Heroku works, many application configuration settings are defined with environment variables. If you are using foreman/etc you may have a different way of accomplishing this. You can also use the included support for the config/env_vars file.

You should not check config/env_vars into source control

You will need to set the SECRET_TOKEN value for the app to start (the default value is too short). The other default value may not be required. If need to point the app to a database or database user different than what is in the included database.yml, you should do that with an environment variable. Once complete:

bundle exec rake db:create
rake db:setup

If you receive a Postgres connection error or role error, you may need to create a Postgres user:

createuser -s -r <USERNAME FROM database.yml>

Development

powder open

The site should now be running. If you need to use sidekiq, or elasticsearch, you may need to start other services manually.

Loading a database dump

If you want to debug production issues on your development machine, grab a dump from heroku, or have someone with the necessary access rights do that for you, by running:

$ heroku pgbackups:capture
$ curl -o latest.dump `heroku pgbackups:url`

Rebuilding elasticsearch index

After loading new data from a db dump or performing a similar operation, you will need to rebuild the elasticsearch index.

To do this run:

$ rake search:index

That will invoke the rake task in lib/tasks/search.rake.

Testing

All that should be required is running guard in the project root. You can also just run rake.

We have the project on Travis-CI. If you submit a pull request, I assume it should check on that. I don't know.

NOTE that the Elasticsearch tests require that port 9250 is available on localhost. If you are running tests on a Linux box, for example, you may need to alter iptables or other firewall service to open that port.

Copyright & License

The Pop Up Archive software is released under the Affero GNU General Public License.

Copyright (c) 2013 The Public Radio Exchange, www.prx.org

This program is free software: you can redistribute it and/or modify it under the terms of the Affero GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Affero GNU General Public License for more details.

You should have received a copy of the Affero GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

pop-up-archive's People

Contributors

kookster avatar cqr avatar baileyspace avatar shindostrz avatar webdevlasse avatar farski avatar annewootton avatar iaperez avatar pkarman avatar saltzshaker avatar zealoushacker avatar flux3000 avatar paulmillr avatar waffle-with-pears avatar

Watchers

Jude Mwenda avatar James Cloos 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.