- PostgreSQL or Docker (depending which method you choose)
- Clone this repo to your local machine:
git clone https://github.com/patrickclery/amazon-asin.git
- From the command-line, cd into the directory:
cd amazon-asin
If you are using rvm_autoupdate_flag=1
in your ~/.rvmrc
, this will automatically install Ruby 2.6.5. Otherwise, run it manually:
rvm install
Note: Using RVM is optional, just make sure you have Ruby 2.6.5 available.
- Run the setup script. This does several things:
- Installs bundler (if necessary)
- Installs the required ruby gems
- Prepares your database
- Seeds your database
bin/setup
- Fire up Docker on your local machine
- Run this command to build and deploy the app:
docker-compose --env-file=.env up
Note: .env is generated by bin/setup
but you can create one using the sample .env.sample
- Be sure that your Docker container publishes port 3000 (manually required).
-
Fork the repo.
-
Run the setup script.
bin/setup
This does several things:
- Installs the required ruby gems and JavaScript packages.
- Prepares your database:
- Creates the databases
- Seeds the data
- Creates a .env file with default settings
-
Open the app in your browser by navigating to http://localhost:3000/
-
Fire up Docker on your local machine
-
Run this command to build and deploy the app:
docker-compose --env-file=.env up
Note: .env is generated by
bin/setup
but you can create one using the sample .env.sample -
Be sure that your Docker container publishes port 3000 (manually required).
-
Open the app in your browser by navigating to http://localhost:3000/
-
Install heroku CLI on MacOS:
brew tap heroku/brew && brew install heroku
-
Deploy the app on Heroku (this requires a heroku.com account.) You will want to enable "Automatic Deploys" for your master branch.
heroku git:remote -a your-heroku-subdomain-goes-here heroku stack:set container git push heroku master
-
The app should be up & running on your Heroku subdomain. If not, you can debug any errors by checking the build long (under the "Activity" tab on Heroku), or tailing the logs:
heroku logs --tail
- GitHub Actions
- Docker images published on every commit to master branch (@via docker build-push-action)
- RSpec tests run on every push
- Dockerization
- Heroku Deployment (using the Docker configuration)
- Core
- better_errors – useful error pages with interactive stack traces
- fast_jsonapi – a JSON serializer that follows the standards of Google's JSON:API
- react-rails – combines Rails + React + Webpacker. comes setup with a default App component at /
- rubocop – enforces Ruby code style
- Security
- brakeman – detect security vulnerabilities
- Testing