CircleCI License

automation-calculator

Purpose

To help people make and communicate automation decisions quickly and effectively.

Examples of automation decisions.

Setup

Dependencies

  • Ruby 2.0.0+
  • Docker Engine 17.09.0+
  • Docker Compose (Must support Compose 3.4 format)

Install

./go init

Use

View app in local browser

  • ./go start
  • Open browser, go to http://localhost:3001/.
  • If you wish to configure the port to be something else, edit RAILS_SERVER_PORT inside docker-compose.yml.

Interact with the app via terminal

  • ./go shell

Run the tests

  • ./go test
  • ./go lint

View available functions

  • ./go help

Troubleshooting/Gotchas

  • Problem: If you update the Gemfile and run ./go test, ./go shell or a similar command, you will see Could not find NEW_GEM_DEPENDENCY_NAME_HERE.
  • Solution: Run ./go build to update your development docker image to include the new dependency.
  • Problem: ./go start starts the development container, but it stops with exit code 1 after a few seconds. You check the logs and see a message like: A server is already running. Check /usr/src/app/tmp/pids/server.pid.
  • Solution: Run ./go shell, cd /usr/src/app/tmp/pids, rm server.pid. Then exit the shell container and run ./go start again.
  • Problem: You see an error message like ERROR: Service 'dev' failed to build: The command '/bin/sh -c useradd -ms /bin/bash $username' returned a non-zero code: 2 when running a command like ./go test or ./go start.
  • Solution: Run ./go init before running any other ./go commands.