add mysql dependency + fix routing
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Mauro Torrez 2019-09-20 12:18:16 -03:00
parent 1d8ec91a4e
commit 972c0726db

View File

@ -10,6 +10,7 @@ RUN { \
echo 'opcache.revalidate_freq=2'; \
echo 'opcache.fast_shutdown=1'; \
} > /etc/php/7.3/embed/conf.d/opcache-recommended.ini
# https://wordpress.org/support/article/editing-wp-config-php/#configure-error-logging
RUN { \
# https://www.php.net/manual/en/errorfunc.constants.php
@ -31,6 +32,9 @@ ENV WORDPRESS_VERSION 5.2.3
ENV WORDPRESS_SHA1 5efd37148788f3b14b295b2a9bf48a1a467aa303
RUN set -ex; \
apt-get update && apt-get -y install --no-install-recommends \
php7.3-mysql \
&& rm -rf /var/lib/apt/lists/* ; \
curl -o wordpress.tar.gz -fSL "https://wordpress.org/wordpress-${WORDPRESS_VERSION}.tar.gz"; \
echo "$WORDPRESS_SHA1 *wordpress.tar.gz" | sha1sum -c -; \
# upstream tarballs include ./wordpress/ so this gives us /usr/src/wordpress
@ -42,21 +46,18 @@ RUN set -ex; \
# port used by the listener in config.json
EXPOSE 8080
# application setup
# launch Unit
# launch and configure Unit
RUN \
[ -f /var/www/html/index.php ] || { \
-f /var/www/html/index.php ] || { \
touch /var/www/html/index.php /var/www/html/index.php.remove; \
} \
&& unitd --control unix:/var/run/control.unit.sock \
# upload the app config to Unit
&& curl -X PUT --data-binary \
'{ \
'{ \
"listeners": { "*:8080": { "pass": "routes" } }, \
"routes": [ \
{ "match": { "uri": "*.php" }, "action": { "pass": "applications/direct_php" } }, \
{ "action": { "share": "/var/www/html" } }, \
{ "match": { "uri": "!*/" }, "action": { "share": "/var/www/html" } }, \
{ "action": { "pass": "applications/index_php" } } \
], \
"applications": { \
@ -77,7 +78,7 @@ RUN \
"index": "index.php" \
} \
} \
}' \
}' \
--unix-socket /var/run/control.unit.sock http://localhost/config/ \
&& [ -f /var/www/html/index.php.remove ] && { \
rm /var/www/html/index.php /var/www/html/index.php.remove; \