cwa-server
cwa-server copied to clipboard
Feature/optimized dockerfiles
Checklist
- [x] Test your changes as thoroughly as possible before you commit them. Preferably, automate your test by unit/integration tests.
- [x] Make sure
mvn -P integration-tests clean verifyruns for the whole project and, if you touched any code in the respective service, ensure it can be run withspring-boot:run
Description
Refactorization of Dockerfiles / docker-compose
- docker-compose: Introduced
preparationas new dummy service which will not run. --preperationdownloads all maven dependencies required for the common and the service package. --preperationgenerates the .jars for the other services. - Dockerfiles: All regular services no longer download maven dependencies or perform compilations. Instead, they use the .jars provided by the
preperationservice.
Due to these changes, maven dependencies are only downloaded once and the code is only compiled once. This leads a sizeable speedup for $ docker-compose build.