-
Notifications
You must be signed in to change notification settings - Fork 9
Makefile
All commands should be run from the root directory of the repository, or using the -C <Path-To-Repo> flag.
make up
This command prepares and starts the development environment. First, it will build the API jar and Docker image. If a pgdata Docker volume does not already exist, it will be created using the SQL scripts in the ./sql folder. Finally, the database and API containers are started and networked together using docker-compose. This command is used for initial setup as well as starting up the environment after using make down.
To automatically follow the logs of the Docker containers when startup is complete:
make up-i
make dev
This command will shut down, build, and run the API with any new changes to the .java files. Testing is skipped with this command to allow faster builds.
To automatically follow the logs of the API Docker container:
make dev-i
make build
This command will stop the API container and rebuild it.
Build the API jar only:
make build-maven
make test
This command will run the maven test goals for the API.
Show logs for the API only:
make logs
Show logs for the database only:
make logs-db
Show logs for both:
make logs-all
make down
This command will stop the Docker containers for both the API and the Postgres database. Changes made to the local database will be saved on the pgdata Docker volume.
make clean
This command will stop all Docker containers, remove the API build artifacts, and delete the local Postgres volume. Any changes to the database will be lost, and it will be re-initialized to the scripts in the ./sql folder the next time make up is run.