mirror of
https://git.sindominio.net/estibadores/wordpress.git
synced 2024-11-22 02:31:07 +01:00
Wait for db to be ready on the setup
Instead of doing a sleep hack, let's actually check that the database is there.
This commit is contained in:
parent
365821fda0
commit
2734427bd9
@ -2,7 +2,7 @@ FROM registry.sindominio.net/nginx-php
|
|||||||
|
|
||||||
RUN apt-get update && \
|
RUN apt-get update && \
|
||||||
apt-get -qy install --no-install-recommends \
|
apt-get -qy install --no-install-recommends \
|
||||||
gnupg ca-certificates less curl jq unzip wget \
|
gnupg ca-certificates less curl jq unzip wget default-mysql-client \
|
||||||
php-mysql php-curl php-gd php-mbstring php-xml php-xmlrpc php-soap php-intl php-zip php-redis && \
|
php-mysql php-curl php-gd php-mbstring php-xml php-xmlrpc php-soap php-intl php-zip php-redis && \
|
||||||
apt-get clean && \
|
apt-get clean && \
|
||||||
rm -rf /var/lib/apt/lists/*
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
6
setup
6
setup
@ -3,8 +3,10 @@
|
|||||||
export WORDPRESS_ROOT=/app
|
export WORDPRESS_ROOT=/app
|
||||||
WP_CLI="/usr/local/bin/wp --allow-root --path=$WORDPRESS_ROOT"
|
WP_CLI="/usr/local/bin/wp --allow-root --path=$WORDPRESS_ROOT"
|
||||||
|
|
||||||
# TODO: wait for the DB to be ready
|
while ! $WP_CLI db check; do
|
||||||
sleep 10
|
echo "waiting for the db to be ready"
|
||||||
|
sleep 1
|
||||||
|
done
|
||||||
|
|
||||||
if ! $WP_CLI core is-installed; then
|
if ! $WP_CLI core is-installed; then
|
||||||
echo "Install Wordpress"
|
echo "Install Wordpress"
|
||||||
|
Loading…
Reference in New Issue
Block a user