Check out our detailed guide on setting up Docker for Ruby on Rails 7
Step 1: docker-compose build Step 2: docker-compose run web rails db:create Step 3: docker-compose up run rails by command : docker-compose run web rails
Step 1: Access the Docker Container's Bash docker exec -it bash Step 2: Create DB Step 3: Create DB
- Using swagger document by visiting http://localhost:3000/api-docs/index.html (Locally) (rswag)
- Using postman with the appropriate endpoint and parameters
- In the docker bash command, run the following command
- Config the minimun minimum_coverage by modifying the minimum_coverage in spec_helper.rb file (Using simplecov for the code coverage)
- System dependencies
- ruby 3.1.4
- 'rails', '~> 7.0.8', '>= 7.0.8.1'
- nodejs
- postgres 11
- Host: localhost, port: 5432
- Database: rails_7_with_docker
- username: postgres
- password: postgres