Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker: Move logic to disable FreshRSS updates #3973

Merged
merged 1 commit into from Nov 14, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions Docker/Dockerfile
Expand Up @@ -42,6 +42,8 @@ RUN a2dismod -f alias autoindex negotiation status && \

RUN sed -r -i "/^\s*(CustomLog|ErrorLog|Listen) /s/^/#/" /etc/apache2/apache2.conf && \
sed -r -i "/^\s*Listen /s/^/#/" /etc/apache2/ports.conf && \
# Disable built-in updates when using Docker, as the full image is supposed to be updated instead.
sed -r -i "\\#disable_update#s#^.*#\t'disable_update' => true,#" ./config.default.php && \
touch /var/www/FreshRSS/Docker/env.txt && \
echo "7,37 * * * * . /var/www/FreshRSS/Docker/env.txt; \
su www-data -s /bin/sh -c 'php /var/www/FreshRSS/app/actualize_script.php' \
Expand Down
2 changes: 2 additions & 0 deletions Docker/Dockerfile-Alpine
Expand Up @@ -39,6 +39,8 @@ RUN rm -f /etc/apache2/conf.d/languages.conf /etc/apache2/conf.d/info.conf \
sed -r -i "/^\s*(CustomLog|ErrorLog|Listen) /s/^/#/" \
/etc/apache2/httpd.conf && \
if [ ! -f /usr/bin/php ]; then ln -s /usr/bin/php8 /usr/bin/php; else true; fi && \
# Disable built-in updates when using Docker, as the full image is supposed to be updated instead.
sed -r -i "\\#disable_update#s#^.*#\t'disable_update' => true,#" ./config.default.php && \
touch /var/www/FreshRSS/Docker/env.txt && \
echo "27,57 * * * * . /var/www/FreshRSS/Docker/env.txt; \
su apache -s /bin/sh -c 'php /var/www/FreshRSS/app/actualize_script.php' \
Expand Down
2 changes: 2 additions & 0 deletions Docker/Dockerfile-Newest
Expand Up @@ -39,6 +39,8 @@ RUN rm -f /etc/apache2/conf.d/languages.conf /etc/apache2/conf.d/info.conf \
sed -r -i "/^\s*(CustomLog|ErrorLog|Listen) /s/^/#/" \
/etc/apache2/httpd.conf && \
if [ ! -f /usr/bin/php ]; then ln -s /usr/bin/php8 /usr/bin/php; else true; fi && \
# Disable built-in updates when using Docker, as the full image is supposed to be updated instead.
sed -r -i "\\#disable_update#s#^.*#\t'disable_update' => true,#" ./config.default.php && \
touch /var/www/FreshRSS/Docker/env.txt && \
echo "27,57 * * * * . /var/www/FreshRSS/Docker/env.txt; \
su apache -s /bin/sh -c 'php /var/www/FreshRSS/app/actualize_script.php' \
Expand Down
2 changes: 2 additions & 0 deletions Docker/Dockerfile-Oldest
Expand Up @@ -39,6 +39,8 @@ RUN rm -f /etc/apache2/conf.d/languages.conf /etc/apache2/conf.d/info.conf \
sed -r -i "/^\s*(CustomLog|ErrorLog|Listen) /s/^/#/" \
/etc/apache2/httpd.conf && \
if [ ! -f /usr/bin/php ]; then ln -s /usr/bin/php7 /usr/bin/php; else true; fi && \
# Disable built-in updates when using Docker, as the full image is supposed to be updated instead.
sed -r -i "\\#disable_update#s#^.*#\t'disable_update' => true,#" ./config.default.php && \
touch /var/www/FreshRSS/Docker/env.txt && \
echo "27,57 * * * * . /var/www/FreshRSS/Docker/env.txt; \
su apache -s /bin/sh -c 'php /var/www/FreshRSS/app/actualize_script.php' \
Expand Down
2 changes: 2 additions & 0 deletions Docker/Dockerfile-QEMU-ARM
Expand Up @@ -48,6 +48,8 @@ RUN a2dismod -f alias autoindex negotiation status && \

RUN sed -r -i "/^\s*(CustomLog|ErrorLog|Listen) /s/^/#/" /etc/apache2/apache2.conf && \
sed -r -i "/^\s*Listen /s/^/#/" /etc/apache2/ports.conf && \
# Disable built-in updates when using Docker, as the full image is supposed to be updated instead.
sed -r -i "\\#disable_update#s#^.*#\t'disable_update' => true,#" ./config.default.php && \
touch /var/www/FreshRSS/Docker/env.txt && \
echo "17,47 * * * * . /var/www/FreshRSS/Docker/env.txt; \
su www-data -s /bin/sh -c 'php /var/www/FreshRSS/app/actualize_script.php' \
Expand Down
4 changes: 2 additions & 2 deletions Docker/README.md
Expand Up @@ -81,7 +81,7 @@ docker run -d --restart unless-stopped --log-opt max-size=10m \
`--label traefik.frontend.rule='Host:freshrss.example.net;PathPrefixStrip:/FreshRSS/' \`
* You may remove the `--label traefik.*` lines if you do not use Træfik.
* Add `-p 8080:80 \` if you want to expose FreshRSS locally, e.g. on port `8080`.
* Replace `freshrss/freshrss` by a more specific tag (see below) such as `freshrss/freshrss:dev` for the development version, or `freshrss/freshrss:arm` for a Raspberry Pi version.
* Replace `freshrss/freshrss` by a more specific tag (see below) such as `freshrss/freshrss:edge` for the development version, or `freshrss/freshrss:arm` for a Raspberry Pi version.

This already works with a built-in **SQLite** database (easiest), but more powerful databases are supported:

Expand Down Expand Up @@ -284,7 +284,7 @@ while reading the source code from your local (git) directory, like the followin
cd /path-to-local/FreshRSS/
docker run --rm -p 8080:80 -e TZ=Europe/Paris -e FRESHRSS_ENV=development \
-v $(pwd):/var/www/FreshRSS \
freshrss/freshrss:dev
freshrss/freshrss:edge
```

This will start a server on port 8080, based on your local PHP code, which will show the logs directly in your terminal.
Expand Down
3 changes: 0 additions & 3 deletions Docker/entrypoint.sh
Expand Up @@ -6,9 +6,6 @@ find /etc/php*/ -type f -name php.ini -exec sed -r -i "\\#^;?date.timezone#s#^.*
find /etc/php*/ -type f -name php.ini -exec sed -r -i "\\#^;?post_max_size#s#^.*#post_max_size = 32M#" {} \;
find /etc/php*/ -type f -name php.ini -exec sed -r -i "\\#^;?upload_max_filesize#s#^.*#upload_max_filesize = 32M#" {} \;

# Disable built-in updates when using Docker, as the full image is supposed to be updated instead.
sed -r -i "\\#disable_update#s#^.*#\t'disable_update' => true,#" ./config.default.php

if [ -n "$LISTEN" ]; then
find /etc/apache2/ -type f -name FreshRSS.Apache.conf -exec sed -r -i "\\#^Listen#s#^.*#Listen $LISTEN#" {} \;
fi
Expand Down