Caseflow Makefile - department-of-veterans-affairs/caseflow GitHub Wiki

Caseflow Makefile

Running Caseflow

Caseflow can be run in several different ways with various make commands seen below. If you are using an Apple-silicon based Mac, you must use the commands with -m1 appended to them

  • make up: Uses docker-compose to launch the required docker containers (Caseflow DB, VACOLS DB, localstack, redis)
  • make up-m1: Uses docker-compose to launch the required docker containers. On an Apple-silicon Mac, we run the VACOLS DB in a VM instead of a docker container, so this only launches the Caseflow DB, localstack, and redis containers.
  • make run: Executes make up and then uses the Foreman gem to run multiple services at once. The services can be seen in the file 'Procfile' in the Caseflow root directory.
  • make run-m1: Same as run, but executes make up-m1 instead of make up
  • make run-backend: Executes make up and then starts the Rails server with hot reloading
  • make run-backend-m1: Same as run-backend but executes make up-m1 instead of make up
  • make run-frontend: Starts the webpack dev server with hot reloading

Running Caseflow cold

These commands will run Caseflow servers without hot reloading enabled. This saves significant system resources, but can lead to running outdated code if you are not restarting the servers when changing code.

  • make run-backend-cold: Executes make up and then starts the Rails server without hot reloading
  • make run-backend-cold-m1: Same as run-backend-cold but executes make up-m1 instead of make up
  • make run-frontend-cold: Starts the webpack server without hot reloading. This will precompile assets and serve pages from the /public folder like the servers do in higher environments

Environment setup and resetting

  • make clean: Removes logs, compiled webpack assets, and temporary files
  • make realclean: Executes clean and then removes the node_modules folder
  • make reset: Executes reset-dbs, seed-dbs, enable-feature-flags to reset and reseed the local environment
  • make migrate: Runs any pending Rails migrations for all Caseflow DBs

Testing and code quality

  • make one-test {args}: Runs a single Rspec test file whose path is passed in as {args}. Specific tests can be specified with a colon and the test line number at the end of the file path
  • make one-jest {args}: Runs a single Jest test file whose path is passed in as {args}
  • make one-jest-snapshot-update {args}: Updates the snapshot for the file whose path is passed in as {args}
  • make lint: Runs the lint rake command, the same used in our Github Actions builds

Other

  • make c: Launches the Rails console
  • make db: Opens a command line connection to the Caseflow DB