Proper way of automatically adding indexes docker service with Gitlab CI
I’m having trouble with finding a proper way migrating a mongo service. I could either build a custom image with baked in indexes or install docker in main image and add those indexes during startup.
I think that both ways are kinda sketchy. The first is good because it will work, but i think that such things like adding necessary indexes should be in Makefile.
The second second one is sketchy because Docker image should be as light as possible.
Is there a way to call commands in service containers from Gitlab CI file?