Sign inSign up

bennetimo/ghost-wait-mysql

By bennetimo

•Updated almost 7 years ago

Ghost container that waits for a linked mysql container to be ready

Image
0

1.4K

bennetimo/ghost-wait-mysql repository overview

⁠ghost-wait-mysql

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.

⁠Quick Start

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:

  • 3.1 => for ghost 3.1
  • 2.37 => for ghost 2.37
  • 2.31 => for ghost 2.31
  • 2.2 => for ghost 2.2
  • 1.25 => for ghost 1.x
  • 0.7.3 => for ghost 0.x
⁠Configuration

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

⁠Credits

The script used in this container is modified from a comment⁠ by artem-sidorenko.

Tag summary

Content type

Image

Digest

Size

138.1 MB

Last updated

almost 7 years ago

docker pull bennetimo/ghost-wait-mysql