~dricottone/container-images

ref: 52a7c8091b952688aa3a9dd0392a5a5634887919 container-images/haproxy/README.md -rw-r--r-- 1.1 KiB
52a7c809Dominic Ricottone Docs update 1 year, 2 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# haproxy


## Build and Deploy

```
make image
```


### Tags

 + `latest`
 + `syslog` which logs to a `syslog` server at $LOGDEST
   (`default: 127.0.0.1:514`)

----

## Use

Can be used with any container manager toolchain.

Create configuration files in `$confdir`. They should look like:

```
resolvers docker_dns
  nameserver docker 127.0.0.11:53

backend www_backend
  server web1 nginx:80 check resolvers docker_dns

frontend http_frontend
  bind :8080
  bind :8443 ssl crt /var/letsencrypt/example.com.pem alpn h2,http1.1
  mode http
  http-request redirect scheme https unless { ssl_fc }

  default_backend web_backend
```

Try:

```
$conman run --detach --name haproxy --restart always \
    --mount type=bind,src=$confdir,dst=/usr/local/etc/haproxy.d,readonly \
    registry.intra.dominic-ricottone.com/haproxy:latest
```

Or, to log to a `syslog` server at `$loghost:$logport`, try:

```
$conman run --detach --name haproxy --restart always \
    --mount type=bind,src=$confdir,dst=/usr/local/etc/haproxy.d,readonly \
    --env LOGDEST=$loghost:$logport \
    registry.intra.dominic-ricottone.com/haproxy:syslog
```