[blogs] Add custom entrypoint for updating Wordpress on start
- From: Andrea Veri <averi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [blogs] Add custom entrypoint for updating Wordpress on start
- Date: Fri, 29 Apr 2022 16:59:35 +0000 (UTC)
commit 1c76ede41ebc6dda86b9aa03ea6e6381e6ed60cf
Author: Bartłomiej Piotrowski <bpiotrowski gnome org>
Date: Wed Dec 16 09:38:59 2020 +0100
Add custom entrypoint for updating Wordpress on start
Dockerfile | 3 +++
entrypoint | 14 ++++++++++++++
2 files changed, 17 insertions(+)
---
diff --git a/Dockerfile b/Dockerfile
index 7d04da6..db470a9 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -24,3 +24,6 @@ RUN yes no | pecl install redis && \
ADD php.ini /usr/local/etc/php/conf.d/wordpress.ini
RUN sed -i 's/pm.max_children =.*/pm.max_children = 8/' /usr/local/etc/php-fpm.d/www.conf
+
+ADD entrypoint /entrypoint
+ENTRYPOINT ["/entrypoint"]
diff --git a/entrypoint b/entrypoint
new file mode 100755
index 0000000..7dd284c
--- /dev/null
+++ b/entrypoint
@@ -0,0 +1,14 @@
+#!/bin/bash
+
+WP="wp --url=blogs.gnome.org"
+
+IMAGE_VERSION="$WORDPRESS_VERSION"
+CURRENT_VERSION="$($WP core version)"
+
+if [[ "$CURRENT_VERSION" != "$IMAGE_VERSION" ]]; then
+ $WP core update
+ $WP core update-db --network
+ $WP plugin update --all
+fi
+
+exec docker-entrypoint.sh $@
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]