Guillaume "B.B." Van Hemmen
f6414a6ae5
This commit adds the foundational setup for the project, including docker-compose.yml, .env.dist, users_database.yml.dist, and Authelia configurations. It also includes the MIT license and a README with installation instructions and usage. The .gitignore file has been updated to exclude sensitive files. |
||
---|---|---|
authelia | ||
.env.dist | ||
.gitignore | ||
docker-compose.yml | ||
LICENCE | ||
README.md |
Traefik Authelia
Introduction
This project sets up a Traefik reverse proxy with support for Authelia using Docker Compose. Traefik is a modern HTTP reverse proxy and load balancer that makes deploying microservices and integrating them with your existing infrastructure easy. Authelia is an open-source authentication and authorization server that provides 2FA (two-factor authentication) and SSO (single sign-on) capabilities, adding an additional layer of security to your services.
Table of Contents
Prerequisites
- Docker: Make sure Docker is installed and running on your system.
- Docker Compose: You also need Docker Compose to orchestrate the container setup.
Installation
-
Clone the repository:
git clone https://git.van-hemmen.com/GuillaumeHemmen-DockerCompose-Infra/traefik-authelia.git cd traefik-authelia
-
Copy the environment variable template:
cp .env.dist .env
-
Customize the
.env
file as necessary for your environment. -
Copy the Authelia configuration template:
cp ./authelia/configuration.yml.dist ./authelia/configuration.yml
-
Customize the
./authelia/configuration.yml
file as necessary for your environment. -
Copy the Authelia user database template:
cp ./authelia/users_database.yml.dist ./authelia/users_database.yml
-
Customize the
./authelia/users_database.yml
file as necessary for your environment. See the official documentation for more information. -
Create the
acme.json
file and grant it the proper rights:touch ../acme.json && chmod 600 ../acme.json
Usage
-
Start the Traefik service with Docker Compose:
docker compose up -d
-
You can now start adding your services and configure Traefik to reverse proxy to them.
Protecting Other Services
To protect other services using this instance of Traefik and Authelia, simply add the following label to their
docker-compose.yml
configuration:
- 'traefik.http.routers.<serviceName>.middlewares=authelia@docker'
License
This project is licensed under the terms of the MIT license. See the LICENSE file for details.