Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/devgine/traefik
Traefik reverse proxy using docker and TLS
https://github.com/devgine/traefik
docker https makefile minica self-signed-certificate taskfile tls traefik
Last synced: 4 days ago
JSON representation
Traefik reverse proxy using docker and TLS
- Host: GitHub
- URL: https://github.com/devgine/traefik
- Owner: devgine
- License: mit
- Created: 2024-04-04T11:31:00.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2024-12-09T20:06:18.000Z (29 days ago)
- Last Synced: 2024-12-09T21:20:39.108Z (29 days ago)
- Topics: docker, https, makefile, minica, self-signed-certificate, taskfile, tls, traefik
- Language: Shell
- Homepage:
- Size: 8.79 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Stack
## About
This repository contains a traefik reverse proxy and a docker image to generate self-signed certificate for development projects.## Requirements
* git
* docker
* docker compose
* Taskfile (https://taskfile.dev/) OR Makefile## How to ?
### Clone the project
```shell
git clone [email protected]:devgine/stack.git
```## Setup
**Using Taskfile**
```shell
task up
```
**Using Makefile**
```shell
make up
```Visit traefik dashboard to make sure the installation is successfully done https://dashboard.traefik.localhost
Or by visiting the api https://dashboard.traefik.localhost/api/rawdata> **Important**
> To use the traefik certificatem your local domain must be a subdomain of _traefik.localhost_
> For example : _my_project.traefik.localhost_## Help
Run the following command to show all available jobs
**Using Taskfile**
```shell
task
```
**Using Makefile**
```shell
make
```## How to use services with traefik
Below is an example of using the nginx service with traefikAfter running the nginx container, the service should be accessible by visiting https://nginx.traefik.localhost
```yaml
services:
nginx:
container_name: nginx
image: nginx:latest
labels:
- traefik.enable=true
- traefik.docker.network=traefik-network
- traefik.http.routers.nginx-https.rule=Host(`nginx.traefik.localhost`)
- traefik.http.routers.nginx-https.entrypoints=websecure
- traefik.http.routers.nginx-https.tls=true
- traefik.http.services.nginx-loadbalancer.loadbalancer.server.port=80
networks:
- traefik-networknetworks:
traefik-network:
external: true
```## Chrome trust insecure localhost
Open Chrome browser and visit the below URL then allow invalid certificates for resources loaded from localhost.
```text
chrome://flags/#allow-insecure-localhost
```