3 Star 2 Fork 0

Gitee 极速下载 / docker-haproxy

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
此仓库是为了提升国内下载速度的镜像仓库,每日同步一次。 原始仓库: https://github.com/million12/docker-haproxy
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README

HAProxy Load Balancer

Build & Test HAProxy
GitHub Open Issues
Stars Fork
Release

Docker build

Felling like supporting me in my projects use donate button. Thank You!
PayPal

HAProxy docker container million12/haproxy with ALPN and HTTP/2 support.

Tags

Please specify tag when deploying for specific version. Example:

million12/haproxy:latest
million12/haproxy:2.1.5

Features

  • Support for HTTP/2 with ALPN
  • RockyLinux based (migrated at 2.4.16)
  • Ability to provide any arguments to haproxy process Any extra parameters provided to docker run will be passed directly to haproxy command. For example, if you run docker run [run options] million12/haproxy -n 1000 you pass -n 1000 to haproxy daemon.
  • Pretty lightweight, only ~100M (with OpenSSL and HAProxy compiled from source).
  • Default haproxy.cfg provided for demonstration purposes. You can easily mount your own or point to different location using HAPROXY_CONFIG env.
  • Auto restart when config changes This container comes with inotify to monitor changes in HAProxy config and reload HAProxy daemon. The reload is done in a way that no connection is lost.

ENV variables

Variable Default Settings Notes
HAPROXY_CONFIG /etc/haproxy/haproxy.cfg If you mount your config to different location, simply edit it.
HAPROXY_PORTS 80,443 Comma separated ports
HAPROXY_ADDITIONAL_CONFIG Empty List of file that inotify should monitor for changes divided by space. Example below. Space separated
HAPROXY_PRE_RESTART_CMD Empty Command to execute before restarting haproxy
HAPROXY_POST_RESTART_CMD Empty Command to execute after successfully restarting haproxy

Usage

Basic

docker run -ti \
  -p 80:80 \
  -p 443:443 \
  million12/haproxy

Mount custom config , override some options

docker run -d \
  -p 80:80 \
  -v /my-haproxy.cfg:/etc/haproxy/haproxy.cfg \
  million12/haproxy \
  -n 10000

Note: in this case config is mounted to its default location, so you don't need to modify HAPROXY_CONFIG variable.

Monitor additional config files

docker run -d \
  -p 80:80 \
  -e HAPROXY_ADDITIONAL_CONFIG='/etc/haproxy/custom1 /etc/haproxy/custom2' \
  million12/haproxy

Check version and build options

docker run -ti million12/haproxy -vv

Stats

The default URL for stats is http://CONTAINER_IP/admin?stats with username:password ser to admin:admin.


Authors

Author: Marcin ryzy Ryzycki (marcin@m12.io)
Author: Przemyslaw Ozgo (linux@ozgo.info)

空文件

简介

docker-haproxy 顾名思义是 haproxy 的 docker 映像,可方便的部署 haproxy 服务 展开 收起
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
Shell
1
https://gitee.com/mirrors/docker-haproxy.git
git@gitee.com:mirrors/docker-haproxy.git
mirrors
docker-haproxy
docker-haproxy
master

搜索帮助