blob: 9da86f646005aa2eb59759490dfb31f59dc4de7b [file] [log] [blame]
= HelloWorld
This is a minimal Apache Isis application, intended as a starting point to learn what Apache Isis is all about.
For real-world development, we recommend you start with the link:[simpleapp] starter app, which has more structure and includes unit and integration tests.
== Quick start
Build using:
mvn clean install
Run using:
mvn spring-boot:run
Login using:
* username: `sven`
* password: `pass`
The app runs with H2 running in-memory.
== Development
Apache Isis uses DataNucleus as its ORM, which requires that any entities are "enhanced", a post-compile process.
Normally this is done as part of a "mvn clean install", but the entities can also be enhanced explicity using:
mvn datanucleus:enhance -o
This is useful to know if the application fails to bootstrap, complaining of "unenhanced entities".
TIP: You can also use ``
== Docker
To package up the application as a docker image and push to a Docker registry:
* modify the `to/image` configuration property for the link:[jib-maven-plugin] in the `pom.xml`
The default value is ``:
** change `` prefix to push to a registry other than Docker hub
** change `apacheisis/simpleapp` to the name of your app.
* package up the app with the `docker` profile:
mvn -pl webapp -DskipTests -Ddocker package
* to specify Docker registry credentials through some other mechanism, configure the `pom.xml` for `maven-jib-plugin` (it supports a link:[variety of ways] to specify credentials)
* to override the image at the command line, use `-Dimage=...`.
To run a docker image previously packaged:
docker pull apacheisis/simpleapp:latest
docker container run -d -p 8080:8080 apacheisis/simpleapp:latest
This can then be accessed at link:http://localhost:8080[localhost:8080].
=== Externalized Configuration
The application is configured to run in the `/run/secrets` directory.
Configuration can be therefore be externalized by defining an `` secret for the Kubernetes or Docker Swarm cluster.
Spring Boot will use these settings in preference to the configuration properties defined in `classpath:config/`, see link:[Spring docs].