I’m not that familiar with pure Java EE stack. My experience is mostly mixing Java EE with Spring. So, I just wanted to play with it. You can find it here: https://github.com/KrzysztofGoralski/wildfly-template
Java EE
JAX-RS - RESTEasy
Apache Deltaspike (similiar to Spring Data)
H2 Database
Docker
Maven
It is just an example and far from real application. It will be required to add tests for sure and it would be interesting to do it this way: Docker with Arquillian Cube
Install Docker first… I’m using Intellij IDEA Ultimate, to add docker to this IDE:
1. File-> Settings-> Builds, Executions, Deployment -> Clouds
2. Add Docker with API URL = unix:///var/run/docker.sock
My dockerfile is simple and using jboss/wildfly image.
FROM jboss/wildfly
ADD target/wildfly-template.war /opt/jboss/wildfly/standalone/deployments/
RUN /opt/jboss/wildfly/bin/add-user.sh admin Admin#70365 --silent
CMD ["/opt/jboss/wildfly/bin/standalone.sh", "-b", "0.0.0.0", "-bmanagement", "0.0.0.0"]
EXPOSE 8080
To run it:
1. Run -> Run... -> Edit Configurations
2. Add Docker deployment
3. Add image tag and container name in Deployment Tab
4. Generate new container_settings.json in Container tab
5. Run it :)