This code has been run and tested on:
- Ruby - 3.0.2p107
- Rails - 6.1.4.1
- Ruby Gems - Listed in Gemfile
- PostgreSQL - 13.3
- Nodejs - v16.9.1
- Yarn - 1.22.11
- External Deps
- Docker - Download latest version of docker-desktop
- Heroku CLI - Download latest version of heroku-cli
- Git - Download latest version of getting-started-installing-git
Clone this code repository by using git:
git clone https://github.com/ntrujillo/sec_brs.git
bundle install
rails webpacker:install
rails g rspec:install
rails db:create
rails db:migrate
An RSpec test suite is available and can be ran using:
rspec spec .
Run the following code in Powershell if using windows or the terminal using Linux/Mac:
docker run --rm -it --volume "$(pwd):/sec-brs" -e DATABASE_USER=test_app -e DATABASE_PASSWORD=test_password -p 3000:3000 dmartinez05/ruby_rails_postgresql:latest
Note: Each time the Docker container is restarted, run the following commands:
rails db:reset
rake db:drop:all
rake db:create:all
rake db:migrate
rake db:seed
The application can be seen using a browser and navigating to http://localhost:3000/ to run locally:
rails server --binding:0.0.0.0
App requires you to create an account or login to existing account as a user or admin to access functionality.
apt update
apt install nodejs
apt install npm
yarn add bootstrap jquery pooper.js
The application is linked on Heroku's database, you can check the staging and production apps with the following Here.
rails db:migrate
rails server --binding=0.0.0.0
The main.yml file is where we define our workflow CI/CD these will run all Security Brakeman, Rspec, and Rubocop tests. The pipeline from the sec-brs github is already linked to the Heroku database, all is needed is a push.
Make deployment to Heroku with:
git push heroku master
To ensure the pipeline is is set up properly, follow the documentation below for extra support: Continuous Integration Continuous Delivery
Admins looking for support should first look at the application documentation. Users looking for help seek out assistance from the documentation and Admins.
Thank you!