Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/wavesoft/docker-lb
A dynamic front-end for simple docker environments
https://github.com/wavesoft/docker-lb
Last synced: 13 days ago
JSON representation
A dynamic front-end for simple docker environments
- Host: GitHub
- URL: https://github.com/wavesoft/docker-lb
- Owner: wavesoft
- License: apache-2.0
- Created: 2020-05-06T16:39:49.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-05-11T20:39:25.000Z (over 1 year ago)
- Last Synced: 2024-11-13T04:48:30.169Z (2 months ago)
- Language: Go
- Size: 159 KB
- Stars: 1
- Watchers: 4
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# docker-lb
> A dynamic front-end Load Balancer simple docker environmentsDocker-LB is a Layer-7 load-balancer and web front-end for simple docker environments. It can be used for exposing microservices under different virtual servers and paths.
## Usage
Deploy Docker-LB to your public-facing node(s):
```sh
docker run -d --name docker-lb \
-p 80:80 -p 443:443 \
-e [email protected] \
-e AUTOCERT_ORGANISATION="My Company" \
-v /var/run/docker.sock:/var/run/docker.sock \
-v /var/run/docker-lb:/var/run/docker-lb \
wavesoft/docker-lb:latest
```Then you can expose one or more services attached on the same docker network as the `docker-lb` service by specifying the following [labels](#labels):
```sh
docker run \
-l publish.domain=mydomain.com \
-l publish.port=8080 \
-l publish.ssl=on \
...
```## Labels
The following labels can be used on the service containers:
Label
Default
Description
publish.domain
Required
The VirtualServer under which to make this container available under. (Egmydomain.com
)
publish.port
80
Which container port to use as the back-end server. This does not have to be published via-p
, since docker-lb will reach it through the container network.
publish.path
/
The HTTP path to match and forward to the back-end. This is a shorthand to set bothpublish.path.frontend
andpublish.path.backend
to the same value.
publish.path.frontend
/
The HTTP path to match on the Virtual Server. You can use this option to implement path-based routing.
publish.path.backend
/
The HTTP path to match redirect to the back-end server to. If this is different than thepublish.path.frontend
, an HTTP rewrite rule will be established.
publish.ssl
off
Set toon
to expose this service under HTTPS. A certificate will be automatically issued for this service using Lets-Encrypt.