Start db service with already exist data

I’d like to start my db service with already exist data(data folder in cache) in gitlab-ci .However,i haven’t achieved it because caches are stored in the project directory that doesn’t exist in service startup stage. That’s why I am unable to start my service with the data folder.

Is there a way to do that without building service image with data?

I just wrote a command line for service to wait until $CI_PROJECT_DIR is exist than started service with data. Also, you will need an another command to wait until service is up and healthy. After all of these changes, I’ve achieved to deal with this issue.