From a6623b7b2fa3f026a0ea30e49b1a221f7a4a8e55 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Wed, 2 Jan 2019 21:36:33 +0100 Subject: 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 --- Docker/entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Docker/entrypoint.sh') diff --git a/Docker/entrypoint.sh b/Docker/entrypoint.sh index d4e1808bc..ba5d12bf2 100755 --- a/Docker/entrypoint.sh +++ b/Docker/entrypoint.sh @@ -6,7 +6,7 @@ chown -R :www-data . chmod -R g+r . && chmod -R g+w ./data/ if [ -n "$CRON_MIN" ]; then - sed -r -i "\#FreshRSS#s#^[^ ]+ #$CRON_MIN #" /var/spool/cron/crontabs/root + sed -r -i "\#FreshRSS#s#^[^ ]+ #$CRON_MIN #" /var/spool/cron/crontabs/www-data fi exec "$@" -- cgit v1.2.3 From 6c423881d09fe7f3b52987359e74579c6f2025e3 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Sun, 6 Jan 2019 01:07:58 +0100 Subject: Forgotten cron fix https://github.com/FreshRSS/FreshRSS/pull/2208 --- Docker/entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Docker/entrypoint.sh') diff --git a/Docker/entrypoint.sh b/Docker/entrypoint.sh index ba5d12bf2..d4e1808bc 100755 --- a/Docker/entrypoint.sh +++ b/Docker/entrypoint.sh @@ -6,7 +6,7 @@ chown -R :www-data . chmod -R g+r . && chmod -R g+w ./data/ if [ -n "$CRON_MIN" ]; then - sed -r -i "\#FreshRSS#s#^[^ ]+ #$CRON_MIN #" /var/spool/cron/crontabs/www-data + sed -r -i "\#FreshRSS#s#^[^ ]+ #$CRON_MIN #" /var/spool/cron/crontabs/root fi exec "$@" -- cgit v1.2.3 From 4355849ec36efb3aa4b711912abd71e30cf2d5ee Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Wed, 16 Jan 2019 22:19:40 +0100 Subject: Docker Alpine PHP timezone (#2218) https://github.com/FreshRSS/FreshRSS/issues/2153 --- Docker/Dockerfile | 2 ++ Docker/README.md | 2 ++ Docker/entrypoint.sh | 2 ++ 3 files changed, 6 insertions(+) (limited to 'Docker/entrypoint.sh') diff --git a/Docker/Dockerfile b/Docker/Dockerfile index 7aaee52a0..a4be9fd84 100644 --- a/Docker/Dockerfile +++ b/Docker/Dockerfile @@ -1,5 +1,7 @@ FROM alpine:3.8 +ENV TZ UTC + RUN apk add --no-cache \ apache2 php7-apache2 \ php7 php7-curl php7-gmp php7-intl php7-mbstring php7-xml php7-zip \ diff --git a/Docker/README.md b/Docker/README.md index 1a915f326..ac745c49d 100644 --- a/Docker/README.md +++ b/Docker/README.md @@ -66,6 +66,7 @@ sudo docker volume create freshrss-data sudo docker run -d --restart unless-stopped --log-opt max-size=10m \ -v freshrss-data:/var/www/FreshRSS/data \ -e 'CRON_MIN=4,34' \ + -e TZ=Europe/Paris \ --net freshrss-network \ --label traefik.port=80 \ --label traefik.frontend.rule='Host:freshrss.example.net' \ @@ -74,6 +75,7 @@ sudo docker run -d --restart unless-stopped --log-opt max-size=10m \ --name freshrss freshrss/freshrss ``` +* Replace `TZ=Europe/Paris` by your [server timezone](http://php.net/timezones), or remove the line to use `UTC`. * If you cannot have FreshRSS at the root of a dedicated domain, update the command above according to the following model: `--label traefik.frontend.rule='Host:freshrss.example.net;PathPrefixStrip:/FreshRSS/' \` * You may remove the `--label traefik.*` lines if you do not use Træfik. diff --git a/Docker/entrypoint.sh b/Docker/entrypoint.sh index d4e1808bc..528388073 100755 --- a/Docker/entrypoint.sh +++ b/Docker/entrypoint.sh @@ -5,6 +5,8 @@ php -f ./cli/prepare.php > /dev/null chown -R :www-data . chmod -R g+r . && chmod -R g+w ./data/ +find /etc/php*/ -name php.ini -exec sed -r -i "\#^;?date.timezone#s#^.*#date.timezone = $TZ#" {} \; + if [ -n "$CRON_MIN" ]; then sed -r -i "\#FreshRSS#s#^[^ ]+ #$CRON_MIN #" /var/spool/cron/crontabs/root fi -- cgit v1.2.3