Skip to content
/ Micronaut Public template
generated from ak-git/SimpleApp

Simple Micronaut Application with Gradle and Docker support

License

Notifications You must be signed in to change notification settings

ak-git/Micronaut

Repository files navigation

Simple Micronaut Application with Gradle and Docker support

Run using Gradle

./gradlew run -t --args="-micronaut.application.name=Micronaut"
./gradlew version
./gradlew version | grep Version | awk '{ print $2 }'

Update version and add git tag

git tag 2024.11.1

Update dependencies

./gradlew dependencyUpdates

Check dependencies

./gradlew buildHealth

Run docker image

docker run -i --rm a002k/micronaut
docker run -d --name micronaut --rm a002k/micronaut
  • -i Keep STDIN open even if not attached
  • --rm Remove container after stop
  • -e APP_NAME=Micronaut Set environment variables
  • --env-file ./.env set file name with environment variables
  • -d Detach mode, Run container in background and print container ID

and follow -f logs

docker logs -f micronaut

to stop

docker stop micronaut

Run docker image as docker-compose

docker compose run -d --name micronaut --rm micronaut

and follow -f logs

docker compose logs -f micronaut

to stop

docker compose down

Run with environment variables

Check config

docker compose config

Use ./.env file or overwrite as

APP_NAME=Micronaut docker compose up -d

Github Action Badge

Coverage Maintainability Rating Reliability Rating Security Rating

Bugs Code Smells Duplicated Lines (%) Vulnerabilities