Skip to content

A set of simple trivia service that serves the answers/questions pulled from jArchive

License

Notifications You must be signed in to change notification settings

radusalagean/jService

 
 

Repository files navigation

Jservice

A fork of sottenad/jService used for educational, non-profit purposes

Required files

secrets/db_password.txt
config/master.key

Run

  • Clone the repo
  • Run docker compose up

Load the database with data

bundle exec rake get_clues[1,2]
  • Or use the restore-db.sh <backup-file> script if you already have a database backup file that you want to restore.
    • The backup file has to be located in the mounted directory for backups (e.g. ./backups for local env, prod env may have a different mount)

Update Ruby and Rails versions

  • See outdated dependencies: docker exec jservice bundle outdated
  • Update the Ruby version used in Dockerfile.dev
  • Update the Ruby and Rails versions used in Gemfile
  • Remove Gemfile.lock from the repo
  • Update the COPY command in Dockerfile.dev (remove Gemfile.lock from it):
    COPY Gemfile ./
    
  • Remove the jservice container, jservice image and jservice-bundle volume from the host
  • Rebuild the image: docker compose build --no-cache
  • Run docker compose run jservice bundle install to also have the expected Gemfile.lock in our host
  • Adjust the code as needed, follow the release notes and migration guides
  • Run docker compose up and make sure everything works as expected
  • Revert the Dockerfile.dev change back to:
    COPY Gemfile Gemfile.lock ./
    
  • Update the Ruby version used in Dockerfile to match the one we migrated to earlier (for production image)
  • Commit & Push
  • Deploy to staging server and test, then to prod server
    • Build with docker compose --env-file ./env/jservice.env --env-file ./env/db.env -f docker-compose.yml -f docker-compose.prod.yml build --no-cache
    • For prod, the CI/CD build script should already handle this

About

A set of simple trivia service that serves the answers/questions pulled from jArchive

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages

  • Ruby 66.9%
  • HTML 24.8%
  • CSS 3.0%
  • Shell 2.2%
  • Dockerfile 2.0%
  • JavaScript 1.1%