Skip to content

Commit

Permalink
Added health check for wordpress_server
Browse files Browse the repository at this point in the history
  • Loading branch information
ethan committed Dec 14, 2020
1 parent f25ec7c commit 7193019
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Workbench/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,11 @@ services:
command: bash -c 'if [ ! -s /var/www/html/wp-config.php ]; then while ! nc -z wordpress_data 3306 ; do echo waiting for mysql on wordpress_data to start; sleep 3; done; /root/wp core download --allow-root && sleep 10 && /root/wp config create --dbname=wordpress --dbuser=wordpress --dbpass=54y6RxN7GfC7aes3 --dbhost=wordpress_data --allow-root; sleep 3 && /root/wp core install --url="http://localhost/" --title="wordpress" --admin_user="admin" --admin_password="54y6RxN7GfC7aes3" --admin_email="sentrifugo.container@gmail.com" --allow-root && /root/wp --allow-root rewrite structure "/%postname%" --hard --debug; /root/wp rewrite flush --hard --debug --allow-root && sed -i "s/<\/IfModule>/RewriteCond \%{HTTP:Authorization} \^\(\.\*\)\nRewriteRule \^\(\.\*\) - [E=HTTP_AUTHORIZATION:\%1]\n<\/IfModule>\nSetEnvIf Authorization "\(\.\*\)" HTTP_AUTHORIZATION=\$$1/" /var/www/html/.htaccess && /root/sed.sh && /root/wp plugin install jwt-authentication-for-wp-rest-api --activate --allow-root && /root/wp plugin install wp-rest-api-log --activate --allow-root && /root/wp plugin install shibboleth --activate --allow-root; fi; /usr/local/bin/startup.sh;'
ports:
- "80:80"
healthcheck:
test: curl -s wordpress_server:80
interval: 30s
timeout: 30s
retries: 3
devices:
- "/dev/tty:/dev/tty"
volumes:
Expand Down

0 comments on commit 7193019

Please sign in to comment.