Commonly Used Commands

Docker commands

docker stack ls

  • lists all stacks running in the swarm, ie. group of containers
  • stacks are networked together

docker stack services [stack name]

  • lists all the services running in that stack

docker stack rm [stack name]

  • removes or kills a stack

Make commands

Must be run in the project root directory

make start

  • starts up the stack for traefik

make up

  • starts up the stack for the starter project
  • you'll end up in a shell in the container where you can type gradle commands like below

make shell

  • puts you in a shell in the container
  • Ctrl+C to exit shell or type exit

Gradle commands

gradle bootRun

  • starts up the gradle project

gradle dependencies

  • lists all the dependencies of the project

Testing 

https://docs.gradle.org/current/userguide/java_testing.html

https://www.tutorialspoint.com/spring_boot/spring_boot_unit_test_cases.htm

gradle test

  • runs all the unit tests

gradle test --tests SomeTestClass

gradle test --tests SomeTestClass.someTestMethod