Commit Graph

123 Commits

Author SHA1 Message Date
Alexandre Alapetite
c9d5fe2da1 Document automated Docker build from git (#5237)
* Document automated Docker build from git
Fix https://github.com/FreshRSS/FreshRSS/issues/5236
Contributes to https://github.com/FreshRSS/FreshRSS/issues/4089

* Rolling
2023-03-30 11:39:50 +02:00
Rufubi
9604856482 [Docker] Listening for IPv6 connections (#5180)
* Listen for IPv6 connections

* Added information about LISTEN6 variable

* Make LISTEN variable a comma-separated list of values

* Removed debug commands

* Revert changes

---------

Co-authored-by: Rufubi <>
2023-03-26 21:50:27 +02:00
witchcraze
425d790735 docs: fix nginx configuration (#5194)
Update nginx nginx configuration in `Hosted in a subdirectory type.`
2023-03-13 13:02:08 +01:00
Rebecca Scott
1c502aaac2 Add docker-compose instructions for ARM64 (#5175)
* Add docker-compose instructions for ARM64

* Update Docker/README.md

* Update Docker/README.md

---------

Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2023-03-07 10:33:49 +01:00
Alexandre Alapetite
e899e4edd9 More robust application of access permissions (#5062)
* More robust application of access permissions
We were in particular missing directory traversal `+X` in our current recommendations.
Extracted to own shell script so it can easily be invoked.
Update access permissions in Docker to account to be more robust.
#fix https://github.com/FreshRSS/FreshRSS/discussions/5037

* Minor simplification

* Restrict mkdir permissions
Default mkdir permissions are 0777, which is not good for security, so downgrade to 0770.
2023-02-06 15:42:53 +01:00
Alexandre Alapetite
dbdb7869c4 Safer timezone set (#5021)
* Safer timezone set
Add missing tzdata in Docker :newest
Fallback to UTC if no timezone is defined at all
#fix https://github.com/FreshRSS/FreshRSS/pull/4906#issuecomment-1386747169

* Better refactoring
Show fallback timezone everywhere
2023-01-19 18:26:04 +01:00
Alexandre Alapetite
075cf4c800 API avoid logging passwords (#5001)
* API avoid logging passwords
* Strip passwords and tokens from API logs
* Only log failed requests information when in debug mode

* Remove debug SHA

* Clean also Apache logs

* Better comments

* Redact also token parameters

* shfmt

* Simplify whitespace

* redacted
2023-01-11 23:27:14 +01:00
Alexandre Alapetite
7330cbab38 chmod +x extensions (#4956)
To ease adding custom extensions such as in https://github.com/FreshRSS/Extensions/issues/37#issuecomment-1363474585
2022-12-28 23:07:52 +01:00
Alexandre Alapetite
543fa4e76c Docker uniform timezone behaviour (#4905)
* Docker Alpine timezone for :newest and :oldest
Follow-up of https://github.com/FreshRSS/FreshRSS/pull/4903
Forgot the development images Newest and Oldest

* Uniform timezone behaviour

* shellcheck

* A bit more documentation
2022-11-30 20:45:40 +01:00
Alexandre Alapetite
60d626030d Docker Alpine time zone (#4903)
Allow setting the timezone with a `TZ` environment variable in our Alpine-based Docker images just like for our Debian-based Doker images.
See https://github.com/FreshRSS/FreshRSS/discussions/4898#discussioncomment-4245991
2022-11-28 18:02:33 +01:00
Alexandre Alapetite
be79c5a8e7 Docker Alpine 3.17 (#4886)
* Docker Alpine 3.17
Update alternative Docker image to Alpine 3.17 with PHP 8.1.12 (and still Apache 2.4.54)
https://alpinelinux.org/posts/Alpine-3.17.0-released.html

* Fix developer access rights
Put developer in www-data group
2022-11-23 22:40:41 +01:00
Alexandre Alapetite
e1b2f6ae13 Apache TraceEnable Off (#4863)
I have just received an e-mail with a security concern.
Although most likely an obsolete concern (old browsers with Java applets), and the Apache team saying that there is no problem, let's disable the TRACE method by default in our Docker images until we hear anybody actually wanting this feature.
https://httpd.apache.org/docs/current/mod/core.html#traceenable
https://owasp.org/www-community/attacks/Cross_Site_Tracing
2022-11-16 23:27:45 +01:00
Alexandre Alapetite
570503b7f1 Require PHP 7.2+ (#4848)
Drop PHP 7.0- as planned https://github.com/FreshRSS/FreshRSS/discussions/3321#discussioncomment-835704
2022-11-14 15:02:44 +01:00
Alexandre Alapetite
a90d93979f Docker Alpine updates (#4420)
* Added PHP extensions `php-openssl`  (used by PHPMailer) and php-xml (used by SimplePie)
* Upgraded dev image `freshrss/freshrss:newest` to PHP 8.2.
2022-06-19 20:09:09 +02:00
Alexandre Alapetite
95af935a5f Docker entrypoint fix buffering (#4417)
Remove output buffering during auto-install of FreshRSS and auto-creation of the default user.
We were only getting outputs at the end of each command, which was a problem for getting errors and progress, for instance when automatically importing a very large OPML
2022-06-19 20:03:34 +02:00
Alexandre Alapetite
15de58a024 Docker readme volume for extensions (#4397)
* Docker readme volume for extensions
Forgotten from https://github.com/FreshRSS/FreshRSS/pull/4320
Keeping https://github.com/FreshRSS/FreshRSS/pull/2837

* Minor whitespace

* No extension volume for development
2022-05-31 10:04:07 +02:00
Alexandre Alapetite
b4ff1e03dd Docker: Alpine 3.16 (#4391)
https://alpinelinux.org/posts/Alpine-3.16.0-released.html
Apache 2.4.53, PHP 8.0.19
2022-05-30 10:34:24 +02:00
Alexandre Alapetite
f89819bd64 Custom logo HTML (#4369)
* Custom logo HTML
Add option for custom HTML logo/title in the main Web UI view.
Can potentially be different per user.
#fix https://github.com/FreshRSS/FreshRSS/pull/3830/files#r850472247

* logo_html in main config
With new `./data/config.custom.php` to provide custom values before install

* Docker documentation

* whitespace

* Auto relax CSP to allow images for HTML logo

* Documentation
2022-05-23 14:03:19 +02:00
Alexandre Alapetite
4e16dd1ae5 Update Docker readme (#4320)
* Update Docker readme
#fix https://github.com/FreshRSS/FreshRSS/issues/3351

* A few more headers
https://github.com/FreshRSS/FreshRSS/issues/3649
https://doc.traefik.io/traefik/middlewares/http/headers/

* Another docker logs example

* More uniform

* Minor details
2022-04-24 18:35:25 +02:00
Alexandre Alapetite
1acd3ab09b Use typographic quotes (#4133)
* Use typographic quotes

* A few fixes

* Fix

* Fix not saved

* Implement feedback

* Detail

* Revert spoken English fixes
Left for a future dedicated discussion

* More reverts

* Final reverts

* Final minor
2022-01-08 21:58:55 +01:00
Thomas Renes
916df412f5 Fix various typos and spelling errors in documentation, comments and code. (#4134) 2022-01-08 16:25:17 +01:00
Alexandre Alapetite
a6ea90e58b Docker :newest Alpine PHP 8.1 (#4121)
* Docker :newest Alpine PHP 8.1
Update our `:newest` development image to use PHP 8.1 in alpine:edge

* Increase memory for tests
2022-01-04 22:33:31 +01:00
Alexandre Alapetite
816f4178dc Docker fix missing .htaccess (#4074)
Related to https://github.com/FreshRSS/FreshRSS/issues/4073
In our Docker configuration, `.htaccess` files are included only once at startup. The one for themes was missing.
2021-12-20 20:46:41 +01:00
Alexandre Alapetite
4cfeb96f3d Docker: Alpine 3.15 (#3996)
Alpine 3.15 with PHP 8.0.13 and Apache 2.4.51
https://alpinelinux.org/posts/Alpine-3.15.0-released.html
2021-11-27 12:31:51 +01:00
Alexandre Alapetite
81b00bd8aa 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).
2021-11-14 23:25:27 +01:00
Alexandre Alapetite
d924fc5fbb Fix cron regression (#3933)
#fix https://github.com/FreshRSS/FreshRSS/pull/3927/files#r735146297
The path `/var/www/FreshRSS/` might be a Docker volume, breaking files created there during Docker build
2021-10-24 19:39:35 +02:00
Chris Francy
07e00c7681 Docker: don't add crontab unless needed. (#3927)
Adding the crontab as part of the image build makes it more complicated
to add custom entries to the crontab. Adjusting the image and entrypoint
to make it so that the crontab is only added when CRON_MIN is set
simplifies having a custom crontab.
2021-10-24 17:25:03 +02:00
Alexandre Alapetite
acbba9adb2 Improved markdownlint (#3918)
* Improved markdownlint
* Relaxed rules slighlty
* `npm run markdownlint` for automatic tests
* `npm run markdownlint_fix` for automatic syntax fixing
* Applied the fixes on all our Markdown files
2021-10-23 13:43:24 +02:00
Chris Francy
fd74609780 Remove references to Ubuntu image in Docker/Readme.md (#3917)
FreshRSS switched to Debian as the parent For the Image but there
were still a couple references in the README to Ubuntu.
2021-10-23 12:09:43 +02:00
Alexandre Alapetite
6004de845f Docker with Debian 11 (#3782)
PHP 7.4.21, Apache/2.4.48
2021-08-19 16:38:55 +02:00
caminsha
1f7bd93c5f Use environment variables (#3756)
* Add .env file for docker-compose (fix #3755)

Adding a .env has the advantage that the configuration can be stored in a separate file and it'll be possible to just get the newest docker-compose.yml file.

* Update documentation for the .env file

* Update Docker/README.md

Co-authored-by: Frans de Jonge <fransdejonge@gmail.com>

Co-authored-by: Frans de Jonge <fransdejonge@gmail.com>
2021-08-14 12:24:38 +02:00
proletarius101
76db9a6ae3 [docs] fix the cron container terminates upon start (#3718) 2021-07-25 13:49:58 +02:00
Alexandre Alapetite
23158b83cd Alpine 3.14 (#3715)
https://alpinelinux.org/posts/Alpine-3.14.0-released.html
* Apache updated to Apache/2.4.48 (from 2.4.46) https://downloads.apache.org/httpd/CHANGES_2.4.48
* PHP updated to PHP 8.0.8 (from 8.0.2) https://www.php.net/ChangeLog-8.php#8.0.8
2021-07-24 22:17:44 +02:00
Alexandre Alapetite
483b6eb333 Drop PHP5 and IE11 (#3666)
* Drop PHP5 and IE11
https://github.com/FreshRSS/FreshRSS/discussions/3321
Our Docker :oldest is now based on Alpine 3.5 (2016-12-22)

* More uniform

* More changelog
2021-06-07 17:53:47 +02:00
Alexandre Alapetite
1c3159058f Quick update the doc for master renaming to edge 2021-03-15 00:00:25 +01:00
Alexandre Alapetite
27c4194c8e Disable built-in update when using Docker (#3496)
#fix https://github.com/FreshRSS/FreshRSS/issues/3495
2021-03-04 21:18:34 +01:00
Alexandre Alapetite
0d69175875 Alpine oldest: php5-openssl (#3482)
alpine:3.13 require php5-openssl for some https features.

Otherwise, fail on e.g. the extension page:

```
file_get_contents(): php Unable to find the wrapper "https" - did you
forget to enable it when you configured PHP? in
/var/www/FreshRSS/app/Controllers/extensionController.php on line 45

PHP Warning:
file_get_contents(https://raw.githubusercontent.com/FreshRSS/Extensions/master/extensions.json):
failed to open stream: No such file or directory in
/var/www/FreshRSS/app/Controllers/extensionController.php on line 45

[error] --- Could not fetch available extension from GitHub
```

Does not seem required for newer Alpine versions using PHP7 / PHP8
2021-02-27 11:22:06 +01:00
Creak
13688825f2 Fix nginx config (#3438)
* Fix nginx config

* Remove `proxy_cookie_path`
* Add `proxy_set_header X-Forwarded-Prefix` for the subdirectory config
* Add nginx config when hosted as domain root

* Add `/` at the end of `proxy_pass`
2021-02-11 17:45:11 +01:00
Alexandre Alapetite
bf639f9b98 Docker: Alpine 3.13 with PHP 8 (#3375)
* Docker: Alppine 3.13 with PHP 8

PHP 8.0.1, Apache 2.4.46
Bug https://bugs.php.net/bug.php?id=78681 fixed in Alpine, so workaround
removed from our Dockefile(s)
Supports MySQL 8+
#fix https://github.com/FreshRSS/FreshRSS/issues/3191

* Changelog

* Update CHANGELOG.md

Co-authored-by: Frans de Jonge <fransdejonge@gmail.com>

Co-authored-by: Frans de Jonge <fransdejonge@gmail.com>
2021-01-16 19:39:15 +01:00
Alexandre Alapetite
8dfe209799 Possiblity to autoinstall in Docker Compose (#3353)
* Possiblity to autoinstall in Docker Compose

#fix https://github.com/FreshRSS/FreshRSS/issues/3349

It is simply calling our existing CLI: do-install.php and
create-user.php
https://github.com/FreshRSS/FreshRSS/tree/master/cli

FreshRSS will typically be ready a few seconds before the database, so
introduce a tolerance when the database is not available / up (yet) by
trying a few times to connect. Also useful to avoid service interruption
when DB service is restarted.

Example:

```yml
freshrss-app:
    image: freshrss/freshrss
    container_name:
freshrss-app
    hostname: freshrss-app
    restart: unless-stopped

ports:
      - "8080:80"
    depends_on:
      - freshrss-db

volumes:
      - data:/var/www/FreshRSS/data
      -
extensions:/var/www/FreshRSS/extensions
    environment:
      CRON_MIN:
'*/20'
      FRESHRSS_ENV: development
      FRESHRSS_INSTALL: |-

--api_enabled
        --base_url https://rss.example.net

--db-base freshrss
        --db-host freshrss-db
        --db-password
freshrss
        --db-type pgsql
        --db-user freshrss

--default_user admin
        --language en
      FRESHRSS_USER: |-

--api_password freshrss
        --email user@example.net

--language en
        --password freshrss
        --user admin
      TZ:
Europe/Paris
```

* Minor type f in find

* shellcheck
2021-01-11 22:36:50 +01:00
Alexandre Alapetite
69060cda33 Docker: Environment variable to change Apache port (#3343)
#fix https://github.com/FreshRSS/FreshRSS/issues/3341

New environment variable `LISTEN='0.0.0.0:8080'`

```
docker run -d --network host --uts host -e LISTEN='0.0.0.0:8080' -e
TZ=Europe/Paris --name freshrss   freshrss/freshrss
```
2021-01-07 23:32:39 +01:00
Alexandre Alapetite
85f5dd4bef Docker new :newest image (#3294)
* Docker new :Edge image

New optional Docker image to test upcoming software versions, using
Alpine:Edge
Similar than https://github.com/FreshRSS/FreshRSS/pull/3274 (oldest
image) but for newest.
Usefull for e.g. testing PHP8
https://github.com/FreshRSS/FreshRSS/issues/3082 , MySQL 8
https://github.com/FreshRSS/FreshRSS/issues/3191

* Syntax if symlink already exists in future edge

* Rename to newest

Better match our "Oldest" version, and to avoid conflicts with the
potential renaming of our master branch

* Update Docker/Dockerfile-Newest

Co-authored-by: Frans de Jonge <fransdejonge@gmail.com>

Co-authored-by: Frans de Jonge <fransdejonge@gmail.com>
2020-12-30 15:42:32 +01:00
Alexandre Alapetite
da4121cb6c Docker image for oldest supported PHP version (#3274)
Add a Docker file, which can be used to test FreshRSS with our oldest
supported PHP version.

See
https://pkgs.alpinelinux.org/packages?name=php5&branch=v3.4&arch=x86_64

PHP 5.6.36-r0
2020-12-12 15:59:06 +01:00
Alexandre Alapetite
e0b80e82e2 Docker LogFormat Alpine (#3235)
#fix https://github.com/FreshRSS/FreshRSS/issues/3233
In Alpine, we need to enable mod_logio.c to use %O. Revert to more
standard %b
https://httpd.apache.org/docs/2.4/mod/mod_log_config.html#logformat
2020-10-22 00:04:10 +02:00
Alexandre Alapetite
9ab05c7f67 Docker: Use Apache remoteip (#3226)
#fix https://github.com/FreshRSS/FreshRSS/issues/3224
Log the client remote IP instead of the local proxy IP
https://httpd.apache.org/docs/2.4/mod/mod_remoteip.html
2020-10-16 09:25:43 +02:00
Jucgshu
5eef40162c Remove Docker heathchecks (#3161)
* Update Dockerfile

Remove heathcheck

* Update Dockerfile-Alpine

Remove heathcheck

* Update Dockerfile-QEMU-ARM

Remove heathcheck
2020-08-30 10:10:49 +02:00
Alexandre Alapetite
cb07b13059 More changelog, Docker readme
https://github.com/FreshRSS/FreshRSS/pull/3159
2020-08-29 23:02:45 +02:00
Alexandre Alapetite
b6b6a6de1d Docker use Debian instead of Ubuntu (#3159)
#fix https://github.com/FreshRSS/FreshRSS/issues/3026
Ubuntu 19.10 has expired.
I still cannot get Ubuntu 20.04 to work on ARM (Raspberry Pi) https://github.com/FreshRSS/FreshRSS/pull/2943
Move to Debian 10 Buster instead of our current Ubuntu 19.10 (which was based on Debian 10 Buster).
2020-08-29 15:54:58 +02:00
Germs2004
20d0f9cd76 volume names include redundant prefix (#3108)
This proposed change includes tweaks to the names of the services and volumes, and adds an explicit label to the postgres and freshrss containers.

Using a more generic "freshrss-db" instead of "freshrss_postgresql" seems more standard among other docker projects and makes it a bit easier to switch databases later.

Removing the "freshrss_" prefix from the volume names solves a problem where the docker-compose automatically prepends a "project name" to volume names upon running "up".  So if your docker-compose.yml file is stored in a folder named "freshrss", you would end up with a redundant volume name of "freshrss_freshrss_data".

This also adds a restart policy to the db container.
2020-08-29 12:16:03 +02:00
Alexandre Alapetite
0085b5e0c1 Docker Alpine 3.12 (#3025)
https://alpinelinux.org/posts/Alpine-3.12.0-released.html
With PHP 7.3.18 (from 7.3.17) (and Apache 2.4.43 unchanged).
No other significant change spotted
2020-06-01 13:13:12 +02:00