Skip to content

ketulsheth85/HRSelect

Repository files navigation

This is Ruby on Rails app

  • Ruby version 2.6.3
  • Rails version 5.0.7
  • MySql 5.7.40
  • Solr 8.9.0

Installation

  1. Install Docker if not installed
  2. Clone the repo
  3. By default Montgomery database will be loaded. If you want to work with specific customer, see steps below
  4. Run docker-compose build in Admin mode
  5. Run docker-compose up in Admin mode. First time it's run, it will initialize the database which will take some time. Restart containers after DB initialization is done so that web container can connect to DB.

NOTE: If you encounter this error on Windows "entrypoint.sh no such file or directory", open entrypoint.sh and change line endings from CRLF to LF
If you get a network project_local not found error then Run command docker network create "project_local", then redo up command

  1. Go to http://localhost:3000

Loading specific customer data

  1. Backup customer's database into single SQL file, make sure it contains CREATE SCHEMA statement
  2. Copy your backup into ./docker-db-init folder
  3. If you already ran docker-componse up, delete ../egov-data folder. This will trigger database initialiation next time the container is powered on
  4. Run docker-componse up

Attaching byebug in Docker Container

  1. docker container ls
  2. docker-compose up -d
  3. docker attach {containerID} If you get winpty error try: winpty docker attach {containerID}

Updating Gemfile.lock

If you don't have Rails locally, you can use Docker container to update local Gemfile and commit it to the repo

  1. Make changes to Gemfile (add/remove/upgrade gem)
  2. Run docker-compose run --rm project bundle update, this will apply changes in the container and update Gemfile.lock which will get reflected on your local via shared volume
  3. Run docker-componse up --build
  4. Commit Gemfile.lock to the repo

Rebuilding database

  1. Stop containers docker-compose stop
  2. Delete ../data folder
  3. Start containers docker-componse up

Rebuilding Solr core

  1. Stop containers docker-compose stop
  2. Remove Solr container docker-compose rm -f project-solr
  3. Remove Solr storage volume docker volume rm project_solr_data
  4. Start containers docker-compose up

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published