We use the "Scripts To Rule Them All" pattern to standardise the common commands we have to use.
Setup the application:
$ script/setupStart the server:
$ script/serverStart a console:
$ script/consoleRun the tests:
$ script/testUpdate application to run for its current checkout:
$ script/updateDocker is made available to run these commands locally as containerisation MUST be used on CI and SHOULD be used on live environments. Using Docker locally provides the strongest parity between development and live. It can also be more stable to get running on your machine.
Running the tests regularly should be done without Docker as it is much faster.
$ brew install --cask dockerUse the --docker switch:
$ script/test --dockerYou can set PREFER_DOCKER_FOR_DXW_RAILS=1 in your env to set this preference
automatically.
- Option 1:
- Install and use direnv to set an environment variable on a per codebase basis
- Add
PREFER_DOCKER_FOR_DXW_RAILS=1to your.envrc - Load change with
direnv allow .
- Option 2:
- Set
PREFER_DOCKER_FOR_DXW_RAILS=1in your global.zshrcor.bashrc - Load your change with
source .zshrc
- Set
Switches will take priority over any default preference. For example, with
PREFER_DOCKER_FOR_DXW_RAILS=1 set you can run --no-docker to run without
Docker.