Follow these steps to set up the Rebilling App project on your local machine:
- Build docker image:
docker build -t rebilling_app .
- Run container:
# rails server will run automatically
docker run -p 3000:3000 --name rebilling_app rebilling_app
- Connect to container:
docker exec -it rebilling_app sh
- Install dependencies:
bundle install
- Set up the database:
bundle exec rails db:create
bundle exec rails db:migrate
- Start the Rails server:
bundle exec rails server
To run the test suite, execute:
bundle exec rspec
You need to have the rails server running on port 3000. To simulate the rebilling process, run the seeds creation with the following command:
bundle exec rails db:seed
* To see how it works with old (active/inactive) subscriptions, you can run it several times