This is just a sandbox to play around with a simple JHipster generated monolith application and deploy it to various cloud providers and containers.
The original generated README.md has been renamed as jhipster.md.
Currently being regenerated using JHipster 7.0.1.
The application was originally generated using the JHipster (4.14.1) command line question/response process and then a few simple customisations made to the home page and footer. It has been updated on a semi-regular basis to the latest version. The setup has been consolidated into a jdl file and you can now reproduce the generation (minus customisations) using the following commands:
mkdir jhipster-monolith-dinosaurs
cd jhipster-monolith-dinosaurs
jhipster import-jdl jhipster-monolith-dinosaurs.jdl
The following deployments have been tested for this version of the application.
A Heroku test deployment is currently available here.
The deployment was created and deployed by following these instructions and updated using:
./mvnw package -Pprod -DskipTests
heroku deploy:jar target/dinosaurs.jar --app jhipster-dinosaurs
Following these instructions, first create a docker image and push it to docker hub:
./mvnw package -Pprod -DskipTests verify jib:dockerBuild
docker tag <image-id> johnchase/dinosaurs:latest
docker push johnchase/dinosaurs:latest
You can then run up local instances of the application and database with:
docker-compose -f src/main/docker/app.yml up -d
You can stop and remove the containers with the following (Warning: using down will also delete the container and any saved data):
docker-compose -f src/main/docker/app.yml down
For more advanced production usage see the docker-compose sub-folder.
Using an environment file (.env) can remove the need to keep specifying file and project options.
The deployment files for kubernetes can be found in the kubernetes folder.
I was eventually able to deploy to a local Minikube instance but getting everything configured and working is much harder than other deployments I tried, even when carefully following the instructions. Also note that this deployment does not include the monitoring option described in the Docker section above.
Sauropod icon from Twemoji.
Main image by KoprX.