ned-kelly / docker-multicontainer-libretime

A multi-container deployment of the Libretime Radio Broadcast Server, PostgreSQL, Icecast2 & RabbitMQ, all based on Ubuntu Xenial & Alpine Linux!
56 stars 22 forks source link

use in production #1

Closed frecuencialibre closed 5 years ago

frecuencialibre commented 5 years ago

Thank you for all this work!!!

After spending many MANY hours trying to get LibreTime working in various different server setups, I was honestly blown away by how quickly I was able to get a working instance spun up using this docker build. Well f***ing done. :)

Using docker seems very promising, and clearly superior to both installing LibreTime directly in the host operating system, and also to the development setup we've been experimenting with (see my forum post for description and diagram ) for the goal of being able to both reliably serve the needs of a real radio station with alpha-stage open source software, and also contribute back to LibreTime. If you read that forum post I linked you'll see how similar our goals are, with the difference that I had no knowlege of what docker even is.

And so we're almost ready to bet on this approach for our station, hopefully contributing documentation, bug work, etc. but need to ask two big questions.

1. I'd love to confirm that using docker for production won't bring unforseen problems down the line. Thoughts?

I obviously don't have the experience to be able to make a call here, and am hearing conflicting accounts. On one hand you and many others ARE using docker for production, and your build readme provides specific, apparently quite simple steps to do so.

2. What would a dev-staging-production workflow using ubuntu-multicontainer-libretime look like?

Would this be a job for docker machine? My apologies in advance for my ignorance regarding docker, I'm coming from javascript land...

Again, many thanks. It seems clear that LibreTime is in sore need of a modern production deployment process in order to help folks get up and running quickly in order to not lose as much time as I have haha. I'm excited to get up and running providing documentation in both spanish and english.

ryan

ned-kelly commented 5 years ago

@frecuencialibre - Thanks for your feedback, much appreciated!

After reading both your discourse post and your reply here I've got a few quick points that I'll add re your comments/concerns which should help make your decisions easier:

All-in-all, I'm running this setup fine for production (which is why it was built), There's a few issues with Liquidsoap that need to be ironed out - Occasionally a station "Jingle" might cut short 1 second or repeat, but these seem to be occurring regardless of "docker or no docker" - (I'm currently hunting down a fix, and will push one up when We've got it) - And there's also the issue of not easily being able to import thousands of hundreds of thousands of audio files directly from the filesystem (also not a Docker problem, but rather a Libretime feature still needing to be developed: https://github.com/LibreTime/libretime/issues/70)

Looking forward to your comments.

frecuencialibre commented 5 years ago

baddass! i think PM's have been disabled so i emailed you at the address you have in git for your public commits. my skype is associated with that same email address. i'll just post it here if you don't get the email. i'll be busy this afternoon, but am reading a docker beginners tutorial now.

frecuencialibre commented 5 years ago

regarding the "issues with Liquidsoap that need to be ironed out," could this be the known issue with silan? I was hearing tracks be cut off until I ran

wget -qO- http://download.opensuse.org/repositories/home:/hairmare:/silan/Debian_7.0/Release.key   | apt-key add -
echo 'deb http://download.opensuse.org/repositories/home:/hairmare:/silan/xUbuntu_16.04 ./'   > /etc/apt/sources.list.d/hairmare_silan.list
apt-get update
apt-get install silan

within libretime-core.

note that I had to re-import tracks.

frecuencialibre commented 5 years ago

would an additional production docker-compose file, possibly with the security certificate proxy you mentioned, ports, and anything else you see pertinent be a good option? just sharing my newbie research haha.

https://github.com/docker/docker.github.io/blob/master/compose/extends.md#different-environments docker-compose -f docker-compose.yml -f docker-compose.prod.yml up -d

ps. docker rocks:

docker exec -it libretime-core bash
docker stop libretime-core
nano .env
docker-compose up --no-deps -d libretime-core
ned-kelly commented 5 years ago

Hi @frecuencialibre - Glad you're figuring it out - No need for another docker compose file for production, you can just add in something like Caddy in another container and point to the internal network name of the container (libretime-core) - The issue currently with Caddy (or any the only other reverse proxy I've tried - Nginx) is that the Login page is not working - I have a feeling it's going to be something not being properly forwarded in the Headers - Feel free to post back any results if you have time to investigate.

Your observations re silan i suspect are correct, however upgrading it did not help in my situation when testing.

frecuencialibre commented 5 years ago

when you tested did you delete and re-import the audio files?

ned-kelly commented 5 years ago

@frecuencialibre No, the audio files that you upload be saved on your filesystem - so as long as you keep the PostgreSQL database and the Audio Files mapped in, you can re-build/upgrade the libretime-core as may times as you want and the config will be kept.

frecuencialibre commented 5 years ago

i found that audio files that i had imported prior to upgrading silan continued to cut off incorrectly even after upgrading silan. not sure if audio duration is somehow saved into the db upon import... but anyway files imported through the web interface after upgrading silan then had correct duration.

Robbt commented 5 years ago

Yeah the database entry is modified. You could zero out the fields it stores or rerun the silan on it. I have s prototype of automatic import as a PR also that would allow you to copy the files to a directory and have them automatically reimported.