File tree Expand file tree Collapse file tree 3 files changed +1955
-6
lines changed Expand file tree Collapse file tree 3 files changed +1955
-6
lines changed Original file line number Diff line number Diff line change 1
1
ARG WP_VERSION=5.4-php7.3
2
-
3
2
FROM wordpress:$WP_VERSION-fpm-alpine
4
-
5
3
MAINTAINER RiotKit <riotkit@riseup.net>
6
4
7
5
ARG RIOTKIT_IMAGE_VERSION=""
8
- ENV AUTO_UPDATE_CRON="0 5 * * SAT"
9
6
10
- RUN apk --update add nginx supervisor \
7
+ ENV AUTO_UPDATE_CRON="0 5 * * SAT" \
8
+ PHP_DISPLAY_ERRORS="Off" \
9
+ PHP_ERROR_REPORTING="E_ALL & ~E_DEPRECATED & ~E_STRICT"
10
+
11
+ RUN apk --update add nginx supervisor python3 py3-pip \
11
12
&& curl "https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar" --output /usr/bin/wp \
12
- && mkdir -p /var/tmp/nginx/ \
13
- && chown www-data:www-data /var/tmp/nginx/ -R
13
+ && mkdir -p /var/tmp/nginx/ /var/lib/nginx/tmp/ \
14
+ && chown www-data:www-data /var/tmp/nginx/ /var/lib/nginx/tmp/ -R \
15
+ && pip3 install j2cli
14
16
15
17
ADD etc/supervisor.conf /etc/supervisor.conf
16
18
ADD etc/nginx/nginx.conf /etc/nginx/nginx.conf
17
19
ADD ./wp-config-sample.php /usr/src/wordpress/wp-config-sample.php
18
20
ADD ./update-wordpress.sh /usr/local/bin/update-wordpress.sh
19
21
ADD ./entrypoint-wp.sh /entrypoint-wp.sh
22
+ ADD ./usr /templates/usr
20
23
21
24
ENTRYPOINT ["/bin/bash" , "/entrypoint-wp.sh" ]
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
3
+ set -e
4
+
5
+ setup_php_ini () {
6
+ j2 /templates/usr/local/etc/php/php.ini.j2 > /usr/local/etc/php/php.ini
7
+ }
8
+
3
9
setup_crontab () {
4
10
echo " ${AUTO_UPDATE_CRON} /bin/bash /usr/local/bin/update-wordpress.sh" > /etc/crontabs/root
5
11
}
@@ -18,6 +24,7 @@ install_wordpress() {
18
24
mv /usr/local/sbin/php-fpm.bckp /usr/local/sbin/php-fpm
19
25
}
20
26
27
+ setup_php_ini
21
28
setup_crontab
22
29
install_wordpress
23
30
exec supervisord -c /etc/supervisor.conf
You can’t perform that action at this time.
0 commit comments