docker compose up --build
builds thedb
andrails
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
- Runs within the
rails
containerDockerfile.dev
usingsunspot_solr
gem.entrypoint
starts it. - If you aren't seeing any search results, you probably need to reindex:
docker compose exec rails bash
and thenbundle exec rake sunspot:reindex
. This usually takes 15-20 minutes.
- Also currently runs within the
rails
containerDockerfile.dev
usingredis
gem. Started in theentrypoint
.
- Change Ruby and gem versions in
Gemfile
exec
into Railsbundle update
; this will update theGemfile.lock
file. May need to adjust versions of gems to get them to work together.- Commit the
Gemfile
andGemfile.lock
files
- Use
rvm
to install the version of Ruby specified in theGemfile
. bundle install
(orbundle _1.16.1_ install
)- Copy
config/database.example.yml
toconfig/database.yml
and fill out the appropriate fields. - Copy
config/secrets.example.yml
toconfig/secrets.yml
and fill in your own secrets. To generate a random long secret, userake secret
. - Add Google Analytics tags in
application.js
andlayouts/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.
SHARIAsource is licensed under the GNU GPL 3.0 License.
2017-2023 President and Fellows of Harvard College.