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
: Executesmake 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 asrun
, but executesmake up-m1
instead ofmake up
make run-backend
: Executesmake up
and then starts the Rails server with hot reloadingmake run-backend-m1
: Same asrun-backend
but executesmake up-m1
instead ofmake 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
: Executesmake up
and then starts the Rails server without hot reloadingmake run-backend-cold-m1
: Same asrun-backend-cold
but executesmake up-m1
instead ofmake 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 filesmake realclean
: Executesclean
and then removes the node_modules foldermake reset
: Executesreset-dbs
,seed-dbs
,enable-feature-flags
to reset and reseed the local environmentmake 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 pathmake 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 thelint
rake command, the same used in our Github Actions builds
Other
make c
: Launches the Rails consolemake db
: Opens a command line connection to the Caseflow DB