浏览代码

disable new blog notification

https://github.com/wp-cli/wp-cli/issues/1164
Girish Ramakrishnan 9 年之前
父节点
当前提交
8e30df4f5d
共有 2 个文件被更改,包括 6 次插入5 次删除
  1. 5 3
      Dockerfile
  2. 1 2
      start.sh

+ 5 - 3
Dockerfile

@@ -8,8 +8,13 @@ RUN mv /app/code/wp-content /app/code/wp-content-vanilla && ln -s /app/data/wp-c
 ADD wp-config.php.template /app/code/wp-config.php.template
 ADD start.sh /app/code/start.sh
 
+RUN mkdir -p /run/wordpress/sessions && \
+    ln -sf /run/wordpress/wp-config.php /app/code/wp-config.php
+
 RUN curl -o /app/code/wp https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar 
 RUN chmod +x /app/code/wp
+# https://github.com/wp-cli/wp-cli/issues/1164
+RUN echo "<?php function wp_new_blog_notification() {} ?>" > /run/wordpress/disable-new-blog-notification.php
 
 # Get the plugins
 RUN curl -L -o /app/code/authLdap.zip https://github.com/gramakri/authLdap/archive/7ac3cbf.zip
@@ -34,7 +39,4 @@ RUN sed -e 's/upload_max_filesize = .*/upload_max_filesize = 8M/' \
         -e 's,;session.save_path.*,session.save_path = "/run/wordpress/sessions",' \
         -i /etc/php5/apache2/php.ini
 
-RUN mkdir -p /run/wordpress/sessions && \
-    ln -sf /run/wordpress/wp-config.php /app/code/wp-config.php
-
 CMD [ "/app/code/start.sh" ]

+ 1 - 2
start.sh

@@ -28,8 +28,7 @@ if [[ ! -f "/app/data/.dbsetup" ]]; then
     mkdir -p /app/data/wp-content/mu-plugins
     cp -r /app/code/wp-content-vanilla/* /app/data/wp-content/
 
-    # create db tables
-    $WP --url="${APP_ORIGIN}" core install \
+    $WP --url="${APP_ORIGIN}" --require=/run/wordpress/disable-new-blog-notification.php core install \
         --url="${APP_ORIGIN}" \
         --title="My blog" \
         --admin_user=admin \