Giter Club home page Giter Club logo

awesome-media-center's Introduction

awesome-media-center

alt text

Media center using docker-compose with Traefik, Portainer, Nextcloud and Emby.

Overview

Traefik acts as a reverse proxy to expose the running docker containers, exposes ports 80 and 443. Port 80 redirects all the requests to 443, to enforce HTTPS. Services are registered as dynamic DNS entries in the host machine, that maps a subdomain for the respective container ip. Additionally, each service is SSL certified, managed by Traefik using Letsencrypt.

Prerequisites

  • Domain, with the subdomains registered
  • Server
  • Docker and docker-compose

Installation

Each of the services is represented by a docker stack, containing a docker-compose.yml. For the installation to be more manageable, the only two service deployed by docker cli are traefik and portainer. The remaining services will be deployed using portainer to easily manage the stacks.

First, run trafik:

$ cd trafik
$ docker-compose pull && docker-compose up -d

Next, run the portainer:

$ cd portainer
$ docker-compose pull && docker-compose up -d

Now, that portainer is already up and running, we just add the stacks on portainer dashboard, by adding each of the docker-compose files.

Any issue with the installation should refer to the problems section.

Traefik

On the docker-compose.yml one should change the property basicauth.users. The password should be generated by htpasswd, and for each character "$" should be escaped by inserting another "$" character.

Traefik upgrade

$ docker pull traefik
$ cd traefik
$ docker stop traefik
$ docker rm traefik 
$ docker-compose up -d

Portainer

Should be deployed using portainer under stacks.

Portainer upgrade

$ docker pull portainer/portainer-ce
$ cd portainer
$ docker stop portainer
$ docker rm portainer 
$ docker-compose up -d

Nextcloud

Should be deployed using portainer under stacks.

To setup wizard requires the following credentials:

  • user - nextcloud
  • password - secret
  • database - nextcloud
  • host - db:3306

Nextcloud upgrade

Since nextcloud is managed by the Portainer, we could just recreate the stack, and portainer will automatically fetch the latest image and recreate it.

$ docker pull nextcloud/nextcloud
$ cd nextcloud
$ docker stop nextcloud
$ docker rm nextcloud 
$ docker-compose up -d

Emby

Should be deployed using portainer under stacks.

The volumes should be changed to match the wanted mount. The UID and GID on the environment are described in the section User ID and Group ID.

Emby upgrade

Since emby is managed by the Portainer, we could just recreate the stack, and portainer will automatically fetch the latest image and recreate it.

$ docker pull emby/emby
$ cd emby
$ docker stop emby
$ docker rm emby 
$ docker-compose up -d

Emby Backup

This command will backup the config folder from emby, mounted as an external volume, and create a backup.tar file in your home folder.

$ cd ~
$ docker run --rm --volumes-from emby -v $(pwd):/backup ubuntu tar cvf /backup/backup.tar /config

Emby Restore Backup

On a new container from the same host machine or a different host, you can recreate the same volume as backup by the previous command.

$ cd ~
$ docker run --rm --volumes-from emby -v $(pwd):/backup ubuntu bash -c "cd /config && tar xvf /backup/backup.tar --strip 1"

Transmission

Should be deployed using portainer under stacks.

The volumes should be changed to match the wanted mount. The PUID and PGID on the environment are described in the section User ID and Group ID.

Transmission upgrade

Since transmission is managed by the Portainer, we could just recreate the stack, and portainer will automatically fetch the latest image and recreate it.

$ docker pull transmission/transmission
$ cd transmission
$ docker stop transmission
$ docker rm transmission 
$ docker-compose up -d

User ID and Group ID

With the user you're running docker run:

$ id -u

returns UID for the user, and

$ id -g

returns GID for the user.

Problems

Permissions on data/acme.json are too open then run:

$ chmod 600 acme.json

Written by @snackk

awesome-media-center's People

Contributors

snackk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

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.