curved-furniture-94140
06/30/2021, 7:20 AMsrc/project1
src/project2
src/lib/lib1
src/lib/lib2
...
where project{n}
contain independently deployable applications, and lib
contains shared libraries (projects can’t import each other’s code). Each project{n}
has its own Dockerfile
and docker-compose.yml
. Now I probably also need a “global” docker-compose.yml
that is extended by the one in each project. The difficulty now is how to follow Pant’s philosophy in this setup. For example, in pants I can change any file, and it will figure out what things need to be run. But in the setup I just explained, this won’t work, since pants doesn’t know which databases a particular project or library might require.shy-match-55049
06/30/2021, 3:08 PMhappy-kitchen-89482
06/30/2021, 5:53 PMhappy-kitchen-89482
06/30/2021, 5:53 PMhappy-kitchen-89482
06/30/2021, 5:53 PMcurved-furniture-94140
07/01/2021, 7:41 AMWhen you run tests in the container, what is the entry point? pytest for example?in our current way, it runs pytest as entrypoint. Tho another useful mode we use is where the container just returns a shell which allows the dev to run/debug things
What I’m getting at is distinguishing between “pants creates Docker images that run your tests without pants” vs “pants runs in a Docker image”...indeed. Both seem to have pros/cons. To make things worse, the spinning up of auxiliary services by docker-compose depends on the test set. So I imagine there would be a need to declare the docker-compose services in
BUILD
.happy-kitchen-89482
07/04/2021, 3:20 AMhappy-kitchen-89482
07/04/2021, 3:21 AM