Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/twatanabe/reverse-proxy
- Owner: twatanabe
- Created: 2018-05-23T06:20:20.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-01-15T07:18:36.000Z (almost 6 years ago)
- Last Synced: 2023-09-20T08:25:17.086Z (about 1 year ago)
- Topics: docker-compose, docker-machine, droplet, golang, traefik
- Language: Go
- Homepage:
- Size: 2.69 MB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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
```