Posts

Showing posts from July, 2019

Making a Docker application

Image
In keeping with the self-hosted/homelab theme of the last post, I decided to try my hand at creating a service to run in a Docker container, namely a local network 'radio station' organiser with a web interface. The program is written in Python (no surprises there) with the network streaming handled by VLC, the downloading of audio files (playlists) carried out by YouTube-DL, Python module Bottle fulfilling webserver duties and SQLite3 storing information about downloaded playlists and created streams. The bash commands that are used to start the VLC streams and to download a YouTube playlist are quite specific. VLC streams are launched in the background, with a never-ending, randomly selected order of file playback to be transcoded to mp3 and streamed via http. nohup cvlc -vvv ~/Music/$playlist --random --loop --sout "#gather,transcode{vcodec=none,acodec=mp3,ab=128,channels=2,samplerate=44100,scodec=none}:http{mux=mp3,dst=:$port/}" --sout-keep & Down...

Mini server update

It's been a while since I first introduced my mini Linux server on this site, and a lot has changed in the meantime. I switched to running my services in Docker containers a few months after the original post, then to LXC (Linux Containers) running on the hypervisor OS Proxmox from summer onwards, and more recently back to Docker with Arch as the host system. I settled on Arch as I wanted a rolling release distribution that could be run headless, had low system requirements and strong community support. For production environments, a distribution with an emphasis on stability would make more sense, like Debian or OpenSUSE, but I've had no issues yet when upgrading packages and I find it more fun to be on the bleeding edge anyway since this server doesn't need to have flawless uptime. Despite Arch's reputation, it was easy to install thanks to the excellent documentation available in the wiki. Once booted, I was impressed with the low memory usage even compared to Ub...