This project provides a reusable Makefile for architectures with multiple software components that use docker extensively and are organized as monorep

enspirit / makefile-for-monorepos

submited by
Style Pass
2021-08-05 17:00:05

This project provides a reusable Makefile for architectures with multiple software components that use docker extensively and are organized as monorepositories.

At Enspirit we have embraced docker, docker-compose and monorepositories. Our team is usually rotating among multiple software projects.

We want to have reproducible builds and tooling allowing us to work the same way on all these different projects. We also want only one command to be needed for building then starting a software after a fresh git clone, even for newcomers.

Copy our Makefile from this repo and place it in your own monorepository project. Your source code organization needs to follow the conventions below.

Builds: a folder at level one will be considered a component of the architecture as soon as it includes a Dockerfile. It is the case above for base, api and frontend. For all of them you magically get all the component image rules and component test rules.

Lifecycle: All services defined in the docker-compose files currently enabled by the COMPOSE_FILE variable automatically get the component lifecycle rules.

Leave a Comment
Related Posts