strukturag / nextcloud-spreedme

Spreed.ME Nextcloud app
https://www.spreed.me
GNU Affero General Public License v3.0
56 stars 26 forks source link

Create docker contrainer for nextcloud: issues with 'extra' folder #54

Closed bonanza123 closed 7 years ago

bonanza123 commented 8 years ago

I'm trying to follow the instructions in the README to create a docker container, but I seem to have some issues with the right path for the extra folder. In the documentation just pwd is mentioned, but for its not clear, so I tried the commands mentioned below.

Here some information about my nextcloud structure (running still in owncloud folder as I just upgraded it and don't want to change it right now):

root@owncloud ~www/owncloud/apps/spreedme (git)-[master] # pwd                                                                                                                                                         
/var/www/owncloud/apps/spreedme
root@owncloud ~www/owncloud/apps/spreedme (git)-[master] # ll
total 168K
drwxr-x--- 21 www-data www-data 4.0K Oct 14 21:35 .
drwxr-x--- 37 www-data www-data 4.0K Oct 14 17:45 ..
drwxr-x---  2 www-data www-data 4.0K Oct 14 17:43 appinfo
-rw-r-----  1 www-data www-data   39 Oct 14 17:43 AUTHORS.md
drwxr-x---  2 www-data www-data 4.0K Oct 14 17:43 changelog
-rw-r-----  1 www-data www-data 3.1K Oct 14 17:43 CHANGELOG.md
drwxr-x---  2 www-data www-data 4.0K Oct 14 17:43 config
drwxr-x---  2 www-data www-data 4.0K Oct 14 17:43 controller
-rw-r-----  1 www-data www-data  34K Oct 14 17:43 COPYING
drwxr-x---  2 www-data www-data 4.0K Oct 14 17:43 css
drwxr-x---  2 www-data www-data 4.0K Oct 14 17:43 debug
drwxr-x---  2 www-data www-data 4.0K Oct 14 17:43 doc
drwxr-x---  2 www-data www-data 4.0K Oct 14 17:43 errors
drwxr-x---  3 www-data www-data 4.0K Oct 14 17:43 extra
drwxr-x---  8 www-data www-data 4.0K Oct 14 21:04 .git
-rw-r-----  1 www-data www-data   62 Oct 14 17:43 .gitignore
-rw-r-----  1 www-data www-data  387 Oct 14 17:43 .gitlab-ci.yml
drwxr-x---  2 www-data www-data 4.0K Oct 14 17:43 helper
drwxr-x---  2 www-data www-data 4.0K Oct 14 17:43 img
drwxr-x---  2 www-data www-data 4.0K Oct 14 17:43 js
-rw-r-----  1 www-data www-data 1.3K Oct 14 17:43 Makefile
-rw-r-----  1 www-data www-data  194 Oct 14 17:43 phpunit.integration.xml
-rw-r-----  1 www-data www-data  187 Oct 14 17:43 phpunit.xml
-rw-r-----  1 www-data www-data 7.4K Oct 14 17:43 README.md
drwxr-x---  3 www-data www-data 4.0K Oct 14 17:43 screenshots
drwxr-x---  2 www-data www-data 4.0K Oct 14 17:43 security
lrwxrwxrwx  1 root     root       28 Oct 14 21:35 server.conf -> spreed-webrtc-nextcloud.conf
drwxr-x---  2 www-data www-data 4.0K Oct 14 17:43 settings
-rw-r--r--  1 www-data www-data  612 Oct 14 18:13 spreed-webrtc-nextcloud.conf
drwxr-x---  2 www-data www-data 4.0K Oct 14 17:43 templates
drwxr-x---  5 www-data www-data 4.0K Oct 14 17:43 tests
-rw-r-----  1 www-data www-data  437 Oct 14 17:43 TODO.txt
-rw-r-----  1 www-data www-data  675 Oct 14 17:43 .travis.yml
drwxr-x---  2 www-data www-data 4.0K Oct 14 17:43 user

In this folder, I then ran:

root@owncloud ~www/owncloud/apps/spreedme (git)-[master] # docker run --name spreedme -p 127.0.0.1:8080:8080 -p 127.0.0.1:8443:8443 -v /var/www/owncloud/apps/spreedme/:/srv/extra -i -t spreed/webrtc -c /srv/extra/spreed-webrtc-nextcloud.conf

Which gives me after some time:

Staring Spreed WebRTC server ...
server 2016/10/15 07:48:11 Using '/webrtc/' base base path.
server 2016/10/15 07:48:11.243038 Enabled modules: [youtube presentation contacts screensharing]
server 2016/10/15 07:48:11 Configured extra '/var/www/owncloud/apps/spreedme/extra' is not a directory.

But of course it is a directory:

1 root@owncloud ~www/owncloud/apps/spreedme (git)-[master] # ll /var/www/owncloud/apps/spreedme/extra                                                                                                                        :(
total 24K
drwxr-x---  3 www-data www-data 4.0K Oct 14 17:43 .
drwxr-x--- 21 www-data www-data 4.0K Oct 14 21:35 ..
-rw-r-----  1 www-data www-data   51 Oct 14 17:43 body.html
-rw-r-----  1 www-data www-data  356 Oct 14 17:43 extra-head.html
-rw-r-----  1 www-data www-data  284 Oct 14 17:43 head.html
drwxr-x---  5 www-data www-data 4.0K Oct 14 20:01 static

Maybe its a permission problem with docker? How do fix that? Is the path correct that I assumed for pwd?

P.S.: The file and folder permissions are those recommended by nextcloud

P.P.S.: I had a similar issue when using:

root@owncloud ~www/owncloud/apps/spreedme (git)-[master] # docker run --name spreedme -p 127.0.0.1:8080:8080 -p 127.0.0.1:8443:8443 -v /var/www/owncloud/apps/spreedme/extra/:/srv/extra -i -t spreed/webrtc -c /srv/extra/spreed-webrtc-nextcloud.conf
leonklingele commented 8 years ago

Hi,

it looks like you haven’t created the extra.d folder. From README.md:

This assumes you have stored the additional configuration spreed-webrtc-nextcloud.conf in the current directory and also have created the extra.d folder there.
driminicus commented 8 years ago

I can confirm the issue, I did create an extra.d folder (owned by www-data) and the folder contains spreed-webrtc-nextcloud.conf (also owned by www-data) in the volume mapped to /var/www/nextcloud/apps/spreedme/extra

I got the same error message:

Configured extra '/var/www/html/nextcloud/apps/spreedme/extra' is not a directory.

bonanza123 commented 8 years ago

For me this worked without creating additional folders or changing permissions

docker run -t -i --name spreedme --restart=always --net=host -p 8080:8080 -p 8443:8443 -v /var/www/owncloud/apps/spreedme:/srv/extra -v /var/log/spreed:/var/log/spreed -v /var/www/owncloud/apps/spreedme/extra:/var/www/owncloud/apps/spreedme/extra -i -t spreed/webrtc -c /srv/extra/server.conf
driminicus commented 8 years ago

Thanks, that helped. I needed to add:

-v /var/www/html/nextcloud/apps/spreedme/extra:/var/www/html/nextcloud/apps/spreedme/extra

Something about this probably needs to be added in the readme, since spreedme is looking for a folder at /var/www/[owncloud/nextcloud]/apps/spreedme/extra inside the container, which doesn't exist by default. I'm not really sure why, in the first place, actually. Maybe there's some error in the creation of spreed-webrtc-nextcloud.conf?

leonklingele commented 7 years ago

I assume this can be closed. Please reopen if the issue still persists.