Repository navigation
Split PHP API to allow start without ES - #25
Merged
Merged
Conversation
josvandervelde
approved these changes
Oct 16, 2026
josvandervelde
left a comment
Member
There was a problem hiding this comment.
I was not familiar with the .override.yaml, but I like it! Fully agree, this is a nice solution until #24 is implemented.
Only point would indeed be to update the README.md :)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
(yes there's a wall of text but I promise it's hand written)
(I noticed I forgot to update the README again. Will do after lunch)
Change
This PR allows users to spin up the PHP REST API without also spinning up the Elasticsearch container.
Motivation
The PHP REST API is not fully functional when ES is enabled and no index exists: it will prepend ES errors to its regular output, making the responses impossible to parse. Building the ES images on startup is time consuming (30s-3mins on my machine), so with the introduction of the [ES flag]() it made sense to allow startup of services without Elasticsearch.
Alternatives Considered
The proposed approach "split" the PHP API service definition over two compose files: docker-compose.yaml and docker-compose.override.yaml. A default invocation of
docker compose upuses both. This means the default behavior is not changed with this PR. Introducting a separate compose isn't pretty, but it seemed necessary. I considered the following alternatives:ES_ENABLED. This does not remove the dependency of the php api service on the elastic search service: the elastic search service is still started and the php api will only start after it's healthy, despite the fact that it does not need it. On my laptop, which already has the elastic search image, this has considerable overhead but it gets much worse in CI/CD where an extra image may need to be pulled in.docker compose up php-apiwould no longer start the elastic search container, so it may lead to startup errors.While I'm not a big fan of scattering the configuration across multiple compose files, I do think this is the best solution for v1.2.10.
Because the override file extends the original file by merging properties, the ES-enabled php-api definition needs to be moved to the secondary file.
Considering the frontend is the only service which I think needs Elasticsearch, I would propose to discuss changing the default behavior to not start the PHP API with elastic search. I created a separate issue for that where we can continue that discussion and propose that, if accepted, we address it in a separate PR.