mirror of
https://github.com/FreshRSS/FreshRSS.git
synced 2026-04-26 01:07:40 -04:00
Docker Alpine PHP timezone (#2218)
https://github.com/FreshRSS/FreshRSS/issues/2153
This commit is contained in:
committed by
GitHub
parent
9214eeecff
commit
4355849ec3
@@ -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 \
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user