diff options
| author | 2019-01-02 21:36:33 +0100 | |
|---|---|---|
| committer | 2019-01-02 21:36:33 +0100 | |
| commit | a6623b7b2fa3f026a0ea30e49b1a221f7a4a8e55 (patch) | |
| tree | a63944268e9c8c28ea97fcdde4f8d132344d7358 /Docker/Dockerfile | |
| parent | 92de09bac41d320decb31e6caf2e9b78fab484f7 (diff) | |
Apache performance (#2202)
* Apache performance
API: Use SetEnvIf if available and fallback to RewriteRule
Docker: Disable unused modules.
Docker: Hard-include .htaccess to avoid having to scan for changes in
that file.
Docker: Disable security check of symlinks, which we do not use ayway.
* Apache readme
* Docker/Apache tuning
Run cron job with correct www-data user instead of root
Remove PHP GMP module uneeded for 64-bit Docker image
Add option to mount custom .htaccess for HTTP authentication
Re-add Apache module for HTTP authentication
Move Alpine-specific instructions to Docker file (instead of Apache
conf) to make it easier to have other base images than Alpine
Diffstat (limited to 'Docker/Dockerfile')
| -rw-r--r-- | Docker/Dockerfile | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/Docker/Dockerfile b/Docker/Dockerfile index cca7bb65e..2a25e567d 100644 --- a/Docker/Dockerfile +++ b/Docker/Dockerfile @@ -2,11 +2,9 @@ FROM alpine:3.8 RUN apk add --no-cache \ apache2 php7-apache2 \ - php7 php7-curl php7-gmp php7-intl php7-mbstring php7-xml php7-zip \ + php7 php7-curl php7-intl php7-mbstring php7-xml php7-zip \ php7-ctype php7-dom php7-fileinfo php7-iconv php7-json php7-session php7-simplexml php7-xmlreader php7-zlib \ - php7-pdo_sqlite \ - php7-pdo_mysql \ - php7-pdo_pgsql + php7-pdo_sqlite php7-pdo_mysql php7-pdo_pgsql ENV FRESHRSS_ROOT /var/www/FreshRSS RUN mkdir -p ${FRESHRSS_ROOT} /run/apache2/ @@ -15,9 +13,16 @@ WORKDIR ${FRESHRSS_ROOT} COPY . ${FRESHRSS_ROOT} COPY ./Docker/*.Apache.conf /etc/apache2/conf.d/ -RUN sed -r -i "/^[ ]*(CustomLog|ErrorLog|Listen) /s/^/#/" /etc/apache2/httpd.conf && \ +RUN rm -f /etc/apache2/conf.d/languages.conf /etc/apache2/conf.d/info.conf \ + /etc/apache2/conf.d/status.conf /etc/apache2/conf.d/userdir.conf && \ + sed -r -i "/^\s*LoadModule .*mod_(alias|autoindex|negotiation|status).so$/s/^/#/" \ + /etc/apache2/httpd.conf && \ + sed -r -i "/^\s*#\s*LoadModule .*mod_(deflate|expires|headers|mime|setenvif).so$/s/^\s*#//" \ + /etc/apache2/httpd.conf && \ + sed -r -i "/^\s*(CustomLog|ErrorLog|Listen) /s/^/#/" \ + /etc/apache2/httpd.conf && \ echo "17,37 * * * * php ${FRESHRSS_ROOT}/app/actualize_script.php 2>&1 | tee /tmp/FreshRSS.log" >> \ - /var/spool/cron/crontabs/root + /var/spool/cron/crontabs/www-data ENV CRON_MIN '' ENTRYPOINT ["./Docker/entrypoint.sh"] |
