Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/twatanabe/reverse-proxy

Traefik and docker-machine/compose powered reverse proxy Droplet server
https://github.com/twatanabe/reverse-proxy

docker-compose docker-machine droplet golang traefik

Last synced: 3 days ago
JSON representation

Traefik and docker-machine/compose powered reverse proxy Droplet server

Awesome Lists containing this project

README

        

# Traefik Reverse Proxy

Utilize Traefik secure routing to navigate sub-domain web access to individual web app containers. Essencially structures network layer that connects abc.domain.com and xyz.domain.com accesses to associated page.





### Requirements
- [Digital Ocean](https://www.digitalocean.com/products/droplets/) - Linux Server Droplet
- [Docker Compose](https://docs.docker.com/compose/overview/)
- [Docker Machine](https://docs.docker.com/machine/overview/)
- [Traefik](https://traefik.io/)
- Web App Container for access test, here using Go-Hello and Python-Hello

## How to use

Run Traefik
```
docker-machine use
cd traefik
docker-compose up
```

Run apps
```
cd go-hello
docker-compose up
```

## Ports

- Traefik: 8080
- GoHello: 3000
- PythonHello: 5000

## Apply Traefik Routing

Traefik network will run on _ network defined in the traefik docker-compose.yml. In this project it will run on the "traefik_reverseproxy" network.
Use following config for routing apps using Traefik network
```
version: '3'
services:
go-hello:
build: .
image: codebadger/go-hello
networks:
- reverseproxy
- default
labels:
- "traefik.enable=true"
- "traefik.backend=go-hello"
- "traefik.frontend.rule=Host:go-hello.domain.com"
- "traefik.docker.network=traefik_reverseproxy"
ports:
- "3000:3000"

networks:
reverseproxy:
external:
name: traefik_reverseproxy
```