Sorry this is a little long; I think it the result is a useful pattern and I couldn’t find anything searching. It appears this may have been possible previously and ran into issues as a feature.
So I have a frontend codebase and an API codebase that I’m building with drone.
The API build results in a git tag that Quay sees and builds a container for. The drone half is doing stuff like JS minification, which is going into the tag. The Quay side is really just adding the tag to a base image.
Later, in the build for the frontend site (separate repo, separate build, etc. from the API) it’d be nice to launch the API container so that I can run the test suite with the real API in place. I already have services defined for the frontend itself in this build (and it is ok that they start before the code has really been built).
The issue is that the API is built as an nginx container and a php-fpm container. Which container gets the API codebase (if either) depends more on their use in production - that’s a little flexible. But in the frontend build the API won’t work unless both services can see the API code.
If I add the API code to neither it won’t work and if I add it to one it won’t work, but if I add it to both (IF it works, I make the paths look the same, etc.) then I’m really just pretending they are seeing the same code and some things like logs will be spread between the two (no actual use for the logs here, just an example).
So I’m limited to having the code in both, or building an apache+mod_php version that is single-container, or building a supervisord version with both in one container, etc. and all of these feel kinda gross.
Thanks for reading!
Mark