GithubHelp home page GithubHelp logo

jpjpjunior / docker-traefik Goto Github PK

View Code? Open in Web Editor NEW

This project forked from htpcbeginner/docker-traefik

0.0 0.0 0.0 698 KB

Docker media and home server stack with Docker Compose, Traefik, Swarm Mode, Google OAuth2/Authelia, and LetsEncrypt

Home Page: https://www.smarthomebeginner.com/

License: MIT License

Shell 100.00%

docker-traefik's Introduction

Description

This is the updated docker-compose repo of all the media, home, and web server apps described in the following guides on our website:

IMPORTANT

If you are going to start from scratch using this repo, be prepared to be patient and start slow. There are so many details to pay attention to. I strongly suggest getting Traefik and Traefik dashboard up and running before adding any other app. Here is the order I would recommend:
  1. Traefik with HTTP Authentication. This requires:
    • .env file
    • secrets
    • network definition
    • middlewares and chains
  2. Socket Proxy
  3. Check to ensure Traefik still works
  4. OAuth or Authelia (optional)
  5. Check to ensure OAuth works
  6. Put Traefik dashboard behind OAuth or Authelia and disable HTTP Authentication
  7. Ensure Traefik dashboard works behind OAuth/Authelia
  8. Proceed to add portainer and other apps/services

Go step-by-step. If you bite too big of a piece, I guarantee you will choke.

Supporting Articles:

Obsolete Posts (for educational purposes):

The following posts have been combined and updated for Traefik v2 (linked above):

Docker, Docker Compose, and Traefik Versions (updated January 23, 2022)

  • Docker: 20.10.12
  • Docker Compose: 2.1.1
  • Traefik: 2.6

Known Issue: Cloudflare Companion does not seem to work with Docker Compose v2.2 and above. I could not figure out why. If someone figures it out please share. So at this point v2.1.1 is the highest version I can go for Docker Compose.

Update (September 13, 2021): I moved from TOML to YAML for Traefik 2 dynamic configurations. I have included example configuration files for both. However, since I do not use TOML anymore, there may be minor syntax errors or typos.

Description of Compose Files in this Repo

  • docker-compose-t2.yml - this stack has the most apps/services
  • docker-compose-t2-web.yml - web server specific stack for WordPress and non-WordPress sites with Nginx
  • docker-compose-t2-synology.yml - apps/services that I run on Synology NAS using Docker Compose for Homelab use
  • docker-compose-t2-obsolete.yml - apps/services that I once tried/used but don't use anymore (future compatibility not guaranteed)

Almost any app/service from the Traefik v2 docker-compose files listed above can be copy-pasted to any other compose file in this repo.

Compose Files Archive (NOT ACTIVELY MAINTAINED)

  • archives/docker-compose-t1.yml
  • archives/docker-compose-t1-vpn.yml
  • archives/docker-compose-t1-obsolete.yml
  • archives/docker-compose-t1-swarm.yml

MY SETUP

  • MAIN - Ubuntu 20.04 Virtual Machine on Intel Xeon 5420 Proxmox Host
  • WEB - Ubuntu 20.04 LXC Container on Intel Xeon 5420 Proxmox Host
  • SYNOLOGY - Synology DS918+ NAS

I use Syncthing to keep certain key files synched between various systems.

What apps are included in this stack?

The apps I use are scattered around in several different docker-compose files. Some apps are used in more than one host and some on only one.

FRONTENDS

  • Traefik - Reverse Proxy
  • Docker Socket Proxy - Secure Proxy for Docker API
  • Traefik Custom Error Pages
  • OAuth - Google OAuth 2 Forward Authentication
  • Authelia - Private Forward Authentication
  • Portainer - Container Management
  • Organizr - Unified Frontend
  • Heimdall - Unified Frontend Alternative
  • Autoindex - Plain text Index to All Files

SMART HOME

  • Home Assistant Core - Home Automation
  • HA-Dockermon - Manage Docker containers in Home Assistant
  • Mosquitto - MQTT Broker
  • MotionEye - Video Surveillance
  • ZoneMinder - Video Surveillance
  • MiFlora - MiFlora MQTT Daemon (MiFlora Plant Sensors)

DATABASE

  • MariaDB - MySQL Database
  • phpMyAdmin - Database management
  • InfluxDB - Database for sensor data
  • Postgres - Database
  • Grafana - Graphical data visualization for InfluxDB data
  • Varken - Monitor Plex, Sonarr, Radarr, and Other Data
  • Redis - Key value store
  • Redis Commander - Redis management

DOWNLOADERS

  • jDownloader - Download management
  • TransmissionBT with VPN - Torrent Downloader with IPVanish VPN.
  • SABnzbd - Binary newsgrabber, NZB downloader
  • Nzbget - Binary newsgrabber, NZB downloader
  • qBittorrent with VPN - Torrent downloader

INDEXERS

  • NZBHydra2 - NZB meta search
  • Jackett - Torrent proxy
  • Prowlarr - Torrent proxy

PVRS

  • Lidarr - Music Management
  • Radarr - Movie management
  • Sonarr - TV Shows management
  • LazyLibrarian - Books Management
  • Readarr - Books Management

MEDIA SERVER

  • AirSonic - Music Server
  • NaviDrome - Music Server
  • FunkWhale - Music Server
  • Calibre - Ebook/Audiobook Server
  • Calibre-Web - Ebook/Audiobook Reader
  • Plex - Media Server
  • Emby - Media Server
  • Jellyfin - Media Server
  • Ombi - Media Requests
  • Tautulli - Previously PlexPy. Plex statistics and monitoring
  • Plex-Sync - For Syncing watched status between plex servers
  • PhotoShow - Personal Photo Gallery and viewer
  • TellyTv- IPTV proxy for Plex
  • xTeve- IPTV proxy for Plex

MEDIA FILE MANAGEMENT

  • Bazarr - Subtitle Management
  • Picard - Music Library Tagging and Management
  • Handbrake - Video Conversion, Transcoding, and Compression
  • MKVToolNix - Video Editing, Remuxing (changing media container while keeping original source quality)
  • MakeMKV - Video Editing (Ripping from Disks)
  • FileBot - File renamer
  • Tiny Media Manager - Media Files Management

UTILITIES

  • Firefox - Web Broswer
  • Glances - System Information
  • APCUPSD - APC UPS Management
  • Guacamole - Remote desktop, SSH, on Telnet on any HTML5 Browser
  • Guacamole Daemon - Needed for Guacamole
  • Dozzle - Docker logs viewer
  • qDirStat - Directory Statistics
  • StatPing - Status Page & Monitoring Server
  • SmokePing - Network Latency Monitoring
  • VS Code Server - Code Editor
  • Logarr - Log Management
  • Monitorr - Webfront to display the status of any webapp or service
  • Cloud Commander - Web File Manager
  • Cloud9 - Cloud IDE
  • SMTP To Telegram - Sends all incoming Email messages to Telegram
  • UniFi Controller - Controller for Ubiquiti UniFi Network Gear
  • Rclone - Mount Cloud/Google Drive
  • MergerFS - Merge local and remote file systems

WEB

  • Nginx - Web Server
  • php7 - PHP-FPM

MAINTENANCE

  • Watchtower - Automatic Docker Container Updates
  • Docker-GC - Automatic Docker Garbage Collection
  • Traefik Certificate Dumper - Extract Traefik SSL Certs
  • Cloudflare DDNS - Dynamic IP Updater
  • Cloudflare Companion - Automatic CNAME creation for services

Usage

--------- ANYTHING THAT HAS "example" IN THE NAME WILL HAVE TO BE RENAMED APPROPRIATELY ---------

Installation

First, install Docker and Docker Compose, as described in our Docker Media Server guide.

  1. Clone the repo.
  2. Configure Traefik Docker-Compose snippet and CLI arguments.
  • Edit domain name.
  • DNS Challenge (for LetsEncrypt verification) is enabled by default for cloudflare. Use the Traefik Reverse Proxy guide for help with this.
  • For other providers other than cloudflare, check here.
  1. (Optional) Enable or use HTTP Basic Authentication by renaming the secrets_example folder to secrets adding username and hashed password to the htpasswd file.
  2. Configure environmental variables (.env file)
  • Rename the included .env.example to .env.
  • Edit variables in .env file.
  • All variables (ie. ${XXX}) in docker-compose.yml come from .env file stored in the same place as docker-compose.yml.
  • Ensure good permissions for the .env file (recommended: 640).
  1. Edit docker-compose-t2.yml to include only the services you want or add additional services to it. Be sure to read the comments for each app and create any required files. You can copy snippets between any of the various docker-compose files in the repo.
  2. Start and stop your docker stack as described in our Docker Media Server guide.
  3. (Optional) Put non-docker apps behind Traefik proxy by creating traefik rules based on the examples provided.

Starting and Stopping

I use bash_aliases to simplify starting and stopping containers/stack. Included in the repo is an example of bash_aliases I use (replace USER with your Linux username). Here are some example alias commands:

  • dcup2 - Start Docker Traefik 2 stack
  • dcdown2 - Stop Docker Traefik 2 stack
  • dcrec2 - Start or recreate a specific service
  • dcstop2 - Stop a specific service
  • dcrestart2 - Restart a specific service
  • dclogs2 - See real-time logs for the corresponding stack or service
  • dcpull2 - Pull new images for the corresponding stack or service

Did this Repo help you?

Please consider buying us a coffee (or two) as a token of appreciation.

docker-traefik's People

Contributors

htpcbeginner avatar gzecchi avatar dennisgaida avatar notsaifa avatar waywardone avatar shawnthompson avatar tombomb avatar uasdj25 avatar ptbalazskiss avatar mmillerbkg avatar steven-harris avatar tomanderson2 avatar robflate avatar xplreitr 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.