This is Ruby on Rails app
- Ruby version 2.6.3
- Rails version 5.0.7
- MySql 5.7.40
- Solr 8.9.0
- Install Docker if not installed
- Clone the repo
- By default Montgomery database will be loaded. If you want to work with specific customer, see steps below
- Run
docker-compose buildin Admin mode - Run
docker-compose upin 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 commanddocker network create "project_local", then redo up command
- Go to http://localhost:3000
- Backup customer's database into single SQL file, make sure it contains
CREATE SCHEMAstatement - Copy your backup into ./docker-db-init folder
- If you already ran
docker-componse up, delete ../egov-data folder. This will trigger database initialiation next time the container is powered on - Run
docker-componse up
- docker container ls
- docker-compose up -d
- docker attach {containerID} If you get winpty error try: winpty docker attach {containerID}
If you don't have Rails locally, you can use Docker container to update local Gemfile and commit it to the repo
- Make changes to Gemfile (add/remove/upgrade gem)
- 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 - Run
docker-componse up --build - Commit Gemfile.lock to the repo
- Stop containers
docker-compose stop - Delete ../data folder
- Start containers
docker-componse up
- Stop containers
docker-compose stop - Remove Solr container
docker-compose rm -f project-solr - Remove Solr storage volume
docker volume rm project_solr_data - Start containers
docker-compose up