[store-web] Revert "Drop custom entrypoint"
- From: Bartłomiej Piotrowski <bpiotrowski src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [store-web] Revert "Drop custom entrypoint"
- Date: Tue, 29 Dec 2020 09:28:02 +0000 (UTC)
commit c7d1fc0e095928a1c3971788287d9b6da28c162a
Author: Bartłomiej Piotrowski <bpiotrowski gnome org>
Date: Tue Dec 29 10:26:31 2020 +0100
Revert "Drop custom entrypoint"
This reverts commit 3f6278b65586fa9df0a5f65a2fd3366ea014b38e.
Dockerfile | 7 +++++++
entrypoint | 13 +++++++++++++
2 files changed, 20 insertions(+)
---
diff --git a/Dockerfile b/Dockerfile
index a30478c..8e67a42 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -11,6 +11,10 @@ RUN apt-get update && apt-get install -y libldap-2.4-2 libldap2-dev && \
ADD ipa-ca.crt /etc/ipa-ca.crt
ADD ldap.conf /etc/ldap/ldap.conf
+RUN curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar && \
+ chmod +x wp-cli.phar && \
+ mv wp-cli.phar /usr/local/bin/wp
+
RUN echo no | pecl install apcu && \
docker-php-ext-enable apcu && \
echo 'apc.enable=1' > /usr/local/etc/php/conf.d/docker-php-ext-apcu.ini
@@ -20,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..5f0375b
--- /dev/null
+++ b/entrypoint
@@ -0,0 +1,13 @@
+#!/bin/bash
+
+WP="wp"
+
+IMAGE_VERSION="$WORDPRESS_VERSION"
+CURRENT_VERSION="$($WP core version)"
+
+if [[ "$CURRENT_VERSION" != "$IMAGE_VERSION" ]]; then
+ $WP core update
+ $WP plugin update --all
+fi
+
+exec docker-entrypoint.sh php-fpm
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]