frou / yt2pod

Daemon that monitors YouTube channels and publishes audio podcasts of them
GNU Affero General Public License v3.0
112 stars 12 forks source link

Dockerize application #2

Closed schafezp closed 6 years ago

schafezp commented 6 years ago

I noticed that you indicated you wanted to dockerize this application. It seems like a pretty simple Go single service application which could be expressed as a single Dockerfile and docker-compose.yml file. Since it's a single service docker-compose is not necessary but I find it to be a pleasant interface for spinning up / spinning down containers.To make the daemon work on startup the systemd service could instead call docker. Alternatively a restart policy could be used to automatically restart the container on boot although I'm not sure if this is possible using docker-compose

Environment variables could perhaps be used to pass in various flag values.

Here is a document about dockerizing go applications

I created this issue to keep track of the desired feature. I intend to submit a pull request at some point soon to resolve this issue unless you don't want outside help in which case feel free to close this issue.

frou commented 6 years ago

Zachary - I'm glad you're interested and certainly welcome your help to Dockerize this.

Even though the README has a section regarding systemd, I have never actually used systemd myself. That section was added by a GitHub contributor.

To run yt2pod on my own VPS, I have used Alpine Linux along with this initscript. I know that Alpine Linux is popular in Docker land, so maybe it makes sense to partially reuse that. But I don't have a strong opinion.