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

Adding extensions to FreshRSS in a Docker container? #37

Closed
ghost opened this issue Sep 29, 2018 · 19 comments
Closed

Adding extensions to FreshRSS in a Docker container? #37

ghost opened this issue Sep 29, 2018 · 19 comments

Comments

@ghost
Copy link

ghost commented Sep 29, 2018

This is probably a stupid question, but this is my first time playing with Docker and I can't get this to work. I installed FreshRSS into a Docker container on a Raspberry Pi, and it all works fine. Then I follow the Docker guide to access the container:

$ docker run -it freshrss/freshrss sh

Which gives me a shell in /var/www/FreshRSS/ in the container.

I add the extension to the /extensions directory:

/var/www/FreshRSS # cd extensions/
/var/www/FreshRSS/extensions # wget https://github.com/kevinpapst/freshrss-youtube/archive/master.zip
Connecting to github.com (192.30.255.113:443)
Connecting to codeload.github.com (192.30.255.120:443)
master.zip           100% |*****************************************************************************************| 18800   0:00:00 ETA
/var/www/FreshRSS/extensions # unzip master.zip
Archive:  master.zip
   creating: freshrss-youtube-master/
  inflating: freshrss-youtube-master/.gitignore
  inflating: freshrss-youtube-master/README.md
   creating: freshrss-youtube-master/xExtension-YouTube/
  inflating: freshrss-youtube-master/xExtension-YouTube/LICENSE
  inflating: freshrss-youtube-master/xExtension-YouTube/configure.phtml
  inflating: freshrss-youtube-master/xExtension-YouTube/extension.php
   creating: freshrss-youtube-master/xExtension-YouTube/i18n/
   creating: freshrss-youtube-master/xExtension-YouTube/i18n/de/
  inflating: freshrss-youtube-master/xExtension-YouTube/i18n/de/ext.php
   creating: freshrss-youtube-master/xExtension-YouTube/i18n/en/
  inflating: freshrss-youtube-master/xExtension-YouTube/i18n/en/ext.php
   creating: freshrss-youtube-master/xExtension-YouTube/i18n/fr/
  inflating: freshrss-youtube-master/xExtension-YouTube/i18n/fr/ext.php
  inflating: freshrss-youtube-master/xExtension-YouTube/metadata.json
/var/www/FreshRSS/extensions # mv freshrss-youtube-master/xExtension-YouTube .
/var/www/FreshRSS/extensions # rm -rf freshrss-youtube-master/
/var/www/FreshRSS/extensions # ls
README.md           Tumblr-GDPR         master.zip          xExtension-YouTube

Then visit http://192.168.x.x:8080/i/?c=extension and the new extension doesn't show up?

I tried docker restart freshrss (aka turning it off and on again ;)) but still no luck.

Thanks in advance.

@Frenzie
Copy link
Member

Frenzie commented Sep 29, 2018

It's probably the permissions. Did you check what they are?

@Alkarex
Copy link
Member

Alkarex commented Sep 29, 2018

@obsoletenerd : I believe it is simply that your Docker command is wrong.
Please try with:

sudo docker exec -it freshrss sh

It works for me in Docker, even with the default user.

@Alkarex
Copy link
Member

Alkarex commented Sep 29, 2018

With the command you have run, you now probably have several FreshRSS instances running...

Try:

sudo docker ps -a
sudo docker rm -f ...

P.S.: What you were doing is spinning a new FreshRSS instance, make the changes in that new one, and stop it (without removing it) on exit. Therefore you could not see your changes in your true instance.

@alfureu
Copy link

alfureu commented Dec 30, 2019

I must second this issue. Everything is loaded correctly, in the correct place and with correct permissions. The extension does not show up in FreshRSS. Using linuxserver/freshrss:latest

@Alkarex
Copy link
Member

Alkarex commented Dec 30, 2019

@DOFfactory What docker run command are you using? Are you using a Docker volume for the extensions?

@alfureu
Copy link

alfureu commented Dec 31, 2019

Hi @Alkarex, nothing extra, the standard command from linuxserver.io:

docker create --name=freshrss -e PUID=1000 -e PGID=100 -e TZ=Europe/London p 8088:80 -v /home/docker/freshrss:/config --restart unless-stopped linuxserver/freshrss

@kabili207
Copy link

The current docker image looks for extentions in /config/www/freshrss/extensions

@marienfressinaud
Copy link
Member

You should probably install the extensions in a volume on the host, then mount it in your container. You should not add them in a running container or they risk to be dropped when you stop it. Quick example:

$ mkdir /path/to/extensions
$ # install your extensions in /path/to/extensions as you do usually
$ docker run \
	--rm \
	--volume /path/to/data:/var/www/FreshRSS/data:z \
	--volume /path/to/extensions:/var/www/FreshRSS/extensions:z \
	--publish 127.0.0.1:80:80 \
	--name freshrss \
	freshrss/freshrss

(to adapt for the linuxserver/freshrss image with /config/www/freshrss/extensions)

The main drawback of this technique is that you have to reinstall the default extensions in the host volume (at the moment, only Tumblr-GDPR)

@Alkarex
Copy link
Member

Alkarex commented Jan 15, 2020

We should improve this process. I will try to find time to make a proposition

@alfureu
Copy link

alfureu commented Jan 16, 2020

Hi, I can confirm this works. One comment: the folder must be outside on the host of the docker (naturally), but in case somebody is wondering why is it not working. I agree with @Alkarex that this has to be done nicer, the best would be some clickable "upload" function of extensions through the frontend. It would be lovely to add also url there to download/upload an extension.

@Alkarex
Copy link
Member

Alkarex commented Mar 23, 2020

There is now a distinction between core extensions shipped with FreshRSS, and third-party extensions installed by the user. This makes it easier to mount a Docker volume. Implemented in the /master branch with FreshRSS/FreshRSS#2837
Feedback welcome

@Alkarex Alkarex closed this as completed Mar 23, 2020
@nickelswitte
Copy link

I am not able to get extension to run inside a docker container, therefore I reopen this issue.

The theoretical steps are kinda straight forward, so here is what I did:

  1. Put the folder of an extension, e.g. xExtension-ReadingTime into ./extensions
  2. Check if the volumes are correct
volumes:
      # Optional volume for storing third-party extensions
      - ./extensions:/var/www/FreshRSS/extensions
  1. Check if the extension shows up correctly in the container, they do
# ls
xExtension-ReadingTime  xExtension-ShareByEmail  xExtension-TitleWrap
  1. Restart container

But nothing shows up
grafik

Is there something that I do wrong?

@Alkarex
Copy link
Member

Alkarex commented Dec 23, 2022

Can you try the following command?

docker exec freshrss ls -alh /var/www/FreshRSS/extensions

@nickelswitte
Copy link

total 24K
drwxr----- 5 1000 www-data 4.0K Dec 22 23:53 .
drwxr-xr-x 1 root www-data 4.0K Dec 22 23:53 ..
drwxr----- 3 1000 www-data 4.0K Dec 22 23:26 xExtension-ReadingTime
drwxr----- 7 1000 www-data 4.0K Dec 22 23:44 xExtension-ShareByEmail
drwxr----- 3 1000 www-data 4.0K Dec 22 23:43 xExtension-TitleWrap

@Alkarex
Copy link
Member

Alkarex commented Dec 23, 2022

Right, then:

docker exec freshrss chown www-data:www-data -R /var/www/FreshRSS/extensions
docker exec freshrss chmod g+rx /var/www/FreshRSS/extensions

@nickelswitte
Copy link

Thank you, that has worked. I went into the UI and activated the extensions (all three of them), but they show no effect (no reading time nor email sharing). Am I still missing some detail?

@alfureu
Copy link

alfureu commented Dec 23, 2022

@nickelswitte you need to bind a folder to the docker (if you use it that way) and install the extensions in that subfolder afaik

@Alkarex
Copy link
Member

Alkarex commented Dec 26, 2022

@nickelswitte
Please try with the CustomCSS extension, just for debugging, using the following custom CSS, and when activated, you are supposed to see texts on that page in red:

body {
  color:red;
}

image

Alkarex added a commit to Alkarex/FreshRSS that referenced this issue Dec 26, 2022
To ease adding custom extensions such as in FreshRSS/Extensions#37 (comment)
Alkarex added a commit to FreshRSS/FreshRSS that referenced this issue Dec 28, 2022
To ease adding custom extensions such as in FreshRSS/Extensions#37 (comment)
@mrcozzens
Copy link

The current docker image looks for extentions in /config/www/freshrss/extensions

thank you for this.. I changed my volume to this and that did the trick !
- ./extensions:/config/www/freshrss/extensions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants