How To Use Traefik as a Reverse Proxy for Docker Containers on Ubuntu 20.04

How To Use Traefik as a Reverse Proxy for Docker Containers on Ubuntu 20.04

Traefik is a Docker-aware reverse proxy that includes its own monitoring dashboard. In this tutorial, you’ll use Traefik to route requests to two different web application containers: a Wordpress container and an Adminer container, each talking to a MySQL database. You’ll configure Traefik to serve everything over HTTPS using Let’s Encrypt.

Prerequisites

To follow this tutorial, you will need the following:

  • One Ubuntu 20.04 server set up by following  the Ubuntu 20.04 initial server setup guide, including a sudo non-root user and a firewall.
  • Docker installed on your server, which you can do by following  How to Install and Use Docker on Ubuntu 20.04.
  • Docker Compose installed with the instructions from  How to Install Docker Compose on Ubuntu 20.04.
  • A domain and three A records, db-admin.``your_domainblog.``your_domain and monitor.``your_domain. Each should point to the IP address of your server. You can  learn how to point domains to DigitalOcean Droplets by reading through DigitalOcean’s Domains and DNS documentation. Throughout this tutorial, substitute your domain for your_domain in the configuration files and examples.

Step 1 — Configuring and Running Traefik

The Traefik project has an official Docker image, so we will use that to run Traefik in a Docker container.

But before we get our Traefik container up and running, we need to create a configuration file and set up an encrypted password so we can access the monitoring dashboard.

We’ll use the htpasswd utility to create this encrypted password. First, install the utility, which is included in the apache2-utils package:

traefik docker docker containers ubuntu 20.04

Bootstrap 5 Complete Course with Examples

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Building a simple Applications with Vue 3

Deno Crash Course: Explore Deno and Create a full REST API with Deno

How to Build a Real-time Chat App with Deno and WebSockets

Convert HTML to Markdown Online

HTML entity encoder decoder Online

How To Use Traefik as a Reverse Proxy for Docker Containers on Ubuntu 20.04

Traefik is a Docker-aware reverse proxy that includes its own monitoring dashboard. In this tutorial, you’ll use Traefik to route requests to two different web application containers: a Wordpress container and an Adminer container, each talking to a MySQL database. You’ll configure Traefik to serve everything over HTTPS using Let’s Encrypt.

Install Docker | Docker Compose on Ubuntu 20.04

This brief tutorial shows students and new users how to install Docker and Docker Compose on Ubuntu 20.04 | 18.04. Docker software allows visualization at the operating system level..

How To Install Jenkins on Ubuntu 20.04 / Ubuntu 18.04

Jenkins is an open-source automation server that helps to automate the repetitive tasks involved in the software development process, which includes building, testing, and deployments. Jenkins was forked from the Oracle Hudson project and written in Java. Here, we will see how to install Jenkins on Ubuntu 20.04 / Ubuntu 18.04.

How to Install Docker on Ubuntu 20.04

This tutorial covers how to install Docker on an Ubuntu 20.04 machine. Docker is an open-source containerization platform that allows you to quickly build, test, and deploy applications as portable containers that can run virtually anywhere.

How To Install Nvidia Drivers On Ubuntu 20.04 / Ubuntu 18.04 | ITzGeek

In this article we will learn how to install Nvidia Drivers On Ubuntu 20.04 / Ubuntu 18.04 . All Desktops and Laptops come with a graphics card for displaying images over a monitor.