mirror of
https://github.com/FreshRSS/FreshRSS.git
synced 2026-03-27 10:43:41 -04:00
Docker: Move logic to disable FreshRSS updates (#3973)
Should be done during build and not during entrypoint, to avoid modifying a potential volume (e.g. mounting the source code as a volume is used during development).
This commit is contained in:
committed by
GitHub
parent
b780ef5276
commit
81b00bd8aa
@@ -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' \
|
||||
|
||||
@@ -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' \
|
||||
|
||||
@@ -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' \
|
||||
|
||||
@@ -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' \
|
||||
|
||||
@@ -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' \
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user