GithubHelp home page GithubHelp logo

Docker Set-up on NAS about raveberry HOT 16 CLOSED

raveberry avatar raveberry commented on June 8, 2024
Docker Set-up on NAS

from raveberry.

Comments (16)

MickyGX avatar MickyGX commented on June 8, 2024

So I tried what you suggested and whenever I added the volume into my compose file, it built ok but going to Raveberry now gave me:

500 Internal Server Error
Exception inside application.

Daphne

I created both a blank file and one with the output line above in it and called it mopidy.conf. I changed the permissions to make sure the docker user could access the files but nothing worked. Do I need to have something in the file already?

from raveberry.

MickyGX avatar MickyGX commented on June 8, 2024

So I managed to get the config to work I think, atleast I can see your website with the conf volume mounted. I had to add ports: - 6680:6680 to mopidy docker-compose and this started working again, however, when I try and Enable Streaming it tells me to install icecast2. Is there a way I can tell if it is loading the conf file ok?

from raveberry.

MickyGX avatar MickyGX commented on June 8, 2024

So I've been playing with this now for most of the day and I can't get Raveberry to recognize Icecast no matter what I do. Not sure if its relevant but because I am running this on a NAS and not a Pi port 80 is already taken for Nginx so I have set the outward facing port to 89 i.e. ports: -89:80. It seems to work fine and Raveberry is displayed correctly. Also I can see Icecast and Mopidy screens on their relevant ports. Mopidy is loading the config correctly:

`[audio]
output = lamemp3enc ! shout2send async=false mount=stream ip=192.168.0.2 port=8000 password=password

[http]
hostname = 0.0.0.0 #Note only works with 0.0.0.0, tried localhost, 127.0.0.1 and 192.168.0.2

[spotify]
username =
password =
client_id =
client_secret =
search_album_count = 1
search_artist_count = 1
search_track_count = 1
allow_playlists = false
private_session = true`

And this is my docker-compose file:

version: "3.4" volumes: static-files: songs-cache: driver_opts: type: none o: bind device: /path/to/music/ db: container_name: postgres image: postgres environment: - POSTGRES_DB=raveberry - POSTGRES_USER=raveberry - POSTGRES_PASSWORD=raveberry restart: always redis: container_name: redis image: redis restart: always mopidy: container_name: mopidy image: raveberry/raveberry-mopidy user: "${UID:-1000}:${GID:-1000}" volumes: - songs-cache:/Music/raveberry - /run/user/${UID:-1001}/pulse:/run/user/105/pulse - /path/to/config/mopidy.conf:/config/mopidy.conf:rw ports: - 6680:6680 restart: always daphne: container_name: raveberry image: raveberry/raveberry environment: - ADMIN_PASSWORD=password - MOD_PASSWORD=password - PAD_PASSWORD=password - DOCKER=1 command: bash -c "DJANGO_MOCK=1 python manage.py compilescss && DJANGO_MOCK=1 python manage.py migrate --noinput && scripts/create_users.sh && /usr/local/bin/daphne --bind 0.0.0.0 --port 9000 main.asgi:application" ports: - 9000:9000 volumes: - static-files:/opt/raveberry/static - songs-cache:/Music/raveberry depends_on: - db - redis - mopidy restart: always nginx: container_name: raveberry-nginx image: raveberry/raveberry-nginx ports: - 89:80 volumes: - static-files:/usr/share/nginx/static depends_on: - daphne restart: always icecast: container_name: icecast image: infiniteproject/icecast volumes: - ${DOCKDIR}/icecast2/icecast.xml:/etc/icecast2/icecast.xml # currently have this commented out - /etc/localtime:/etc/localtime:ro environment: - PUID=${PUID} - PGID=${PGID} - TZ=${TZ} - UMASK=002 - ICECAST_SOURCE_PASSWORD=password - ICECAST_ADMIN_PASSWORD=password - ICECAST_PASSWORD=password - ICECAST_RELAY_PASSWORD=password - ICECAST_ADMIN_USERNAME=admin - [email protected] - ICECAST_HOSTNAME=0.0.0.0 - ICECAST_LOCATION=America ports: - 8000:8000 restart: always

Excuse the mess haven't tidied it up yet. If anything obvious I'm doing wrong would appreciate the help. Determined to get this working one way or the other. Thanks

from raveberry.

MickyGX avatar MickyGX commented on June 8, 2024

new 1.txt
Attached as file for clearer reading

from raveberry.

raveberry avatar raveberry commented on June 8, 2024

Hm. The first 500 probably came from the webserver not being able to connect to mopidy. It tries to connect to the mopidy host at port 6680. I thought that it should work inside the docker-compose network without explicit port mapping. Great that you managed to fix this!

You can check the config mopidy loaded by taking a look at its logs. It will tell you to which value it set output.

Raveberry will tell you to "Please install icecast2", because it checks if the icecast2 service is installed on its system. This is not the case in the docker setup of course, so you get this message. However, if mopidy uses the correct configuration, this should not be a problem, streaming should work anyway.

Are you sure that 192.168.0.2 is the ip of your icecast container? According to gstreamer's docu you should also be able to specify a hostname, which should be icecast (the name of the docker container) in your case.

from raveberry.

MickyGX avatar MickyGX commented on June 8, 2024

Thank you for the reply, appreciate you taking the time to help me.

So thats the actual ip's of the containers I have setup, the left column shows the container name. I have tried the actual container IP's, the hostnames, the host computer IP's and nothing seems to work:

image

This is my mopidy config file:

image

I'm starting to think I need to run all the services in a single instance with combined dockerfile, but wouldn't know where to start with that.

Any suggestions?

from raveberry.

MickyGX avatar MickyGX commented on June 8, 2024

Just for info it appears that mopidy is connecting to icecast because everytime i restart mopidy the file_connections on the icecast admin page goes up by one:

image

from raveberry.

MickyGX avatar MickyGX commented on June 8, 2024

so an update, I thought I would just try to play some music in raveberry and check to see if icecast did anything. Lo and behold it showed a stream. Went to 192.168.0.2:8000/stream and i can hear the music! Interestingly though when I tried the suggested link http://icecast:8000/stream it can't reach the page. It still won't connect on Raveberry but it works for what I want. Just need to put both into a single webpage and share! Love this thanks. Please let me know if you want me to try anything out going forward. I don't mind being a guinea pig :)

from raveberry.

raveberry avatar raveberry commented on June 8, 2024

Very nice!
So it was actually working but the stream did not show up without you playing any music?

If I get around to it I will probably integrate this into the documentation and provide a second docker-compose.yml for streaming. After all it was not too much configuration if one knows where to tweak.

from raveberry.

MickyGX avatar MickyGX commented on June 8, 2024

I guess it was but it is still saying install Icecast in Raveberry. Let me know if you do get round to it would be happy to try it out and test it. Ideal scenario would be to have all services in a single instance for docker so everything just works together, but obviously this doesn't matter for Pi.
Just another question, what directories would I have to map for raveberry so it doesn't lose my settings/data on container/server reboot?

from raveberry.

raveberry avatar raveberry commented on June 8, 2024

When running in Docker Raveberry v0.5.6 now checks the presence of icecast differently and gives a more useful message.
Also I uploaded a second docker-compose.yml for a streaming setup that should work out of the box without any additional tweaking as I integrated the fixes from this issue.
I'd be happy to hear about how it works for you.

from raveberry.

MickyGX avatar MickyGX commented on June 8, 2024

I've set it up and a couple of issues:

  1. No matter whats in the playlist the stream constantly plays silence.mp3
    image

  2. Can't access stream no matter what I put in as password. I assumed user would be stream but tried a number of different combinations with password etc/ Now my raveberry/stream link works though just can't access it

from raveberry.

MickyGX avatar MickyGX commented on June 8, 2024

Few more things

  1. When I click enable stream it still !Install Icecast
  2. Tried pointing it to my icecast.xml file and it seems to ignore whats inside it like hostname, passwords etc. Assuming location in container as changed?
  3. Is it possible to disable stream password altogether? Reason is I will be including this on my website which is already user and password restricted

from raveberry.

raveberry avatar raveberry commented on June 8, 2024
  1. Did update your containers? Sounds like you might be running old versions. Try running docker-compose -f icecast.docker-compose.yml pull.
  2. The default credentials are raveberry:raveberry (maybe a little to hidden in streaming.md)
  3. see 1.
  4. I did a copy paste error when adding the config hint into the compose file. Now it contains the correct path in the container (/etc/icecast.xml). Good catch!
  5. Yes. Now that you can add a config to the correct path, just pass one that does not have the <authentication> tag in the <mount> tag for <stream>. Use the default config in docker/icecast.xml as reference.

from raveberry.

MickyGX avatar MickyGX commented on June 8, 2024

Its working now

  1. I deleted all 6 containers but forgot to delete the images doh!
  2. Left as default and can login
  3. Now it says - 'Choose the correct docker-compose file to control streaming'
    image
    As I said streaming is working and shows status as true but can't enable/disable it. Not an issue for me but for reference
  4. If i add:
    image
    to my docker-compose file I get:
    image
    I can live without this for now but would really like to turn off stream password.
  5. See 4

Excellent work by the way. Absolutely love this. I have an online poker game every Friday which runs off my server and we video chat via zoom. Music choice is always an issue and you find people listening to their own music, start singing (badly) and end up muting them lol. This way atleast we can all have a say in what we listen to. Unfortunately it won't stop the bad singing lol.

Really appreciate you helping me getting this working outside of Raspberry Pi. And anything I can to further help let me know!

from raveberry.

raveberry avatar raveberry commented on June 8, 2024

The "Choose the correct file" error is intended behavior, as it is currently not possible to change the streaming status in the docker setup and I do not plan to change that. Streaming can be enabled/disable by running the respective docker-compose.yml, which is what I tried to convey with this short message. Probably I should just indicate that by greying these options or hiding them completely.

You most likely get the icecast error because you used a config from your system, which does not have the changeowner directive enabled. If you use this one you should be fine. There you can also delete the authentication part in the mountpoint to disable stream authentication.

Thank you for your feedback! It's nice to know that my project is actually useful and in operation somewhere else. If you just keep pointing out stuff that doesn't work quite right and make suggestions that is already worth a lot. I hope your next session works well!

I will now close this issue as the docker-setup appears to be working. Feel free to open new ones if more problems arise.

from raveberry.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.