sameersbn / docker-wowza

Dockerfile to containerize Wowza Streaming Engine
MIT License
64 stars 42 forks source link

Need to add custom applications #12

Closed rainabba closed 8 years ago

rainabba commented 8 years ago

I've got a backup of another install I'd been using (AMI right from Wowza) and ideally, I'd like to use it (contents of /conf), but at the least, I want to add a custom Wowza app definition and I'm still getting a feel for Docker. I know that in general, I should fork this project, create my own repo, include that folder in the root of the project, then modify the dockerfile to add it before I build/deploy, but that's where I'm a little fuzzy still. I would like the entire conf folder to be persistent ideally, my media for sure and even if conf wasn't, I'm not 100% sure how to get that change to the Dockerfile done correctly. I think such a need would be common and so it would be a great feature. if I can figure it out, I'll add a PR with stock files or at least the README with an explanation, but I'd still need a hand getting it there.

Any advice or suggestions?

jshimko commented 8 years ago

You can pass in and/or persist any configuration files from your local/server filesystem with Docker's shared volume functionality. See the docker run reference...

https://docs.docker.com/engine/reference/run/#volume-shared-filesystems

Custom Dockerfiles are also an option if you want to have a custom image with your configs baked in, but it isn't required if you put the configs on the Docker host in then mount that folder in the container. See the quickstart example in the readme. Specifically, the following line...

# --volume host_path:container_path  
--volume /path/to/server/wowza-dir:/var/lib/wowza 

You could then throw your conf folder in that dir on the server and the wowza containers should be able to see it.

rainabba commented 8 years ago

Thank you. Might take me a bit to get it done, but I'm sure you've provided all the info so I'll close. :)

sameersbn commented 8 years ago

@rainabba as @jshimko indicated all wowza configs are exposed in the host path mounted at the /var/lib/wowza path of the container. You should see the following directory structure:

# tree -L 1
.
├── applications
├── backup
├── conf
├── content
├── stats
└── transcoder

Copy your files at the appropriate location and restart the container for the changes to take effect

rainabba commented 8 years ago

Thanks. Almost got things working except that it seems my custom application doesn't show up as i'd expect. I'm going to do a clear install and add to it later so I can confirm what appears and where because I think I've ended up with a messy folder in trying, but if someone wanted to clarify for me, that would be better still. New applications have to show up in some form in both conf and applications right? I think a folder by the name of the application, containing an Application.xml in one place, and also another? Something else?