dokku / dokku-redis

a redis plugin for dokku

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Ensure linked services are running before build

CQCumbers opened this issue · comments

I was instructed to file an issue here on the dokku slack channel.

If the services linked to a dokku app are not running, building the app will fail with an error of the form Unable to find image 'dokku/myapp:latest' locally. This is because when Docker attempts to run a container, if linked containers are not available, Docker will say that the image is missing, when in fact the linked containers are missing. Manually restarting linked containers will fix the problem, but it could be prevented by a trigger in the datastore plugins that automatically ensures linked services are running before doing a build.

We'll need a new hook - maybe builder-build-pre $BUILDER_TYPE $APP ? - that we can use to start linked services prior to deploy. There isn't a global one, so if we did this hook by hook (pre-build-dockerfile, pre-build-herokuish, pre-build-pack) then we wouldn't support newer build methods as time goes on. Additionally, adding a new hook each time would be annoying.

That said, this should help with many cases, except for if a datastore crashes and a user deploys afterwards.