Code Monkey home page Code Monkey logo

wiki's Introduction

SHARIAsource

Local dev

docker-compose

  • docker compose up --build builds the db and rails services and starts them.
  • Put a PSQL dump from production in database_dumps
  • To load the data, docker compose exec db bash and then use pg_restore to load the data into the database: pg_restore -U postgres -d shariasource_local /database_dumps/<EXPORTED_FILE>.dump

Solr

  • Runs within the rails container Dockerfile.dev using sunspot_solr gem. entrypoint starts it.
  • If you aren't seeing any search results, you probably need to reindex: docker compose exec rails bash and then bundle exec rake sunspot:reindex. This usually takes 15-20 minutes.

Caching (Redis)

  • Also currently runs within the rails container Dockerfile.dev using redis gem. Started in the entrypoint.

Updating gems

  • Change Ruby and gem versions in Gemfile
  • exec into Rails
  • bundle update; this will update the Gemfile.lock file. May need to adjust versions of gems to get them to work together.
  • Commit the Gemfile and Gemfile.lock files

other

  • Use rvm to install the version of Ruby specified in the Gemfile.
  • bundle install (or bundle _1.16.1_ install)
  • Copy config/database.example.yml to config/database.yml and fill out the appropriate fields.
  • Copy config/secrets.example.yml to config/secrets.yml and fill in your own secrets. To generate a random long secret, use rake secret.
  • Add Google Analytics tags in application.js and layouts/shared/_google_analytics
  • spring binstub --all.
  • The first admin user must be set in the rails console. Create a user, rails c, and set the admin flag. Future roles can be set in-app by this admin.

License

SHARIAsource is licensed under the GNU GPL 3.0 License.

Copyright

2017-2023 President and Fellows of Harvard College.

wiki's People

Contributors

coledcrawford avatar yusufcelik avatar

Watchers

 avatar  avatar  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.