A Java container application with Maven, Docker, MySQL and some samples.
- Install Docker in your host machine. Follow docker documentation and don't forget the optional steps if running on Linux.
- If you are running on Windows, make sure your system met the minimum requirements.
- Run
docker-compose pullto download container images - Execute
docker-compose run mvnto build Java classes and download dependencies files. - Launch with
docker-compose up tomcatand open your browser. - The default address is
http://localhost:8080but this can be changed indocker-compose.yml.
This boilerplate uses Maven Standard Directory Layout to organize the app.
web.xml file is located on src/main/webapp/WEB-INF.
Default project package is br.ufscar.
Maven container entrypoint is set to mvn, making easy to run maven commands (e.g: docker-compose run mvn clean install). Default command is install, so running docker-compose run mvn is the same as mvn install.
A database dump file could be placed on database\data folder. When MySQL container is created, all scripts in that folder will be executed.