Ghost container that waits for a linked mysql container to be ready
1.4K
ghost-wait-mysql is a small modification to the official Ghost Docker image which waits for a mysql container to be up and running before continuing with the original entrypoint.
This avoids problems when using Ghost with Docker Compose, where the Ghost container will error exit if it cannot reach mysql. See this issue for more info.
Just use the bennetimo/ghost-wait-mysql image in place of ghost
The version number of 'bennetimo/ghost-wait-mysql' matches the version of ghost
These are the current published tags:
By default the script will try to reach mysql every 2 seconds for 20 seconds. You can set environment variables to tweak this:
ENV MYSQL_HOST=mysql
Mysql host to try to connect to
ENV MYSQL_PORT=3306
Mysql host post`
ENV WAIT_LOOPS=10
Max number of connection attempts
ENV WAIT_SLEEP=2
Sleep time between each try
The script used in this container is modified from a comment by artem-sidorenko.
Content type
Image
Digest
Size
138.1 MB
Last updated
almost 7 years ago
docker pull bennetimo/ghost-wait-mysql