Skip to content

Commit

Permalink
Merge branch 'master' into patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
tomdess authored Feb 11, 2024
2 parents 1082695 + 6b1de6a commit afbba2e
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 12 deletions.
12 changes: 6 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# start from debian 12 slim version
FROM debian:bookworm-slim
# start from debian 10 slim version
FROM debian:bullseye-slim

# install certbot, supervisor and utilities
RUN apt-get update && apt-get install --no-install-recommends -yqq \
Expand All @@ -18,12 +18,12 @@ RUN apt-get update && apt-get install --no-install-recommends -yqq \
# install haproxy from official debian repos (https://haproxy.debian.net/)

RUN curl https://haproxy.debian.net/bernat.debian.org.gpg \
| gpg --dearmor > /usr/share/keyrings/haproxy.debian.net.gpg \
| gpg --dearmor > /usr/share/keyrings/haproxy.debian.net.gpg \
&& echo deb "[signed-by=/usr/share/keyrings/haproxy.debian.net.gpg]" \
http://haproxy.debian.net bookworm-backports-2.8 main \
> /etc/apt/sources.list.d/haproxy.list \
http://haproxy.debian.net bullseye-backports-2.8 main \
> /etc/apt/sources.list.d/haproxy.list \
&& apt-get update \
&& apt-get install -yqq haproxy \
&& apt-get install -yqq haproxy=2.8.\* \
&& apt-get clean autoclean && apt-get autoremove -y \
&& rm -rf /var/lib/apt/lists/*

Expand Down
25 changes: 19 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,19 +35,21 @@ docker run --name lb -d \

### Run with docker-compose:

Use the docker-compose.yml file in `run` directory (it creates 2 containers, the haproxy one and a nginx container linked in haproxy configuration for test purposes)
Use the docker-compose.yml file in `run` directory (it creates 3 containers, the haproxy one, a nginx container linked in haproxy configuration for test purposes and a sidecar rsyslog container)

```
# docker-compose.yml file content:
$ cd run
$ mkdir data
$ cp ../conf/haproxy.cfg data/
# modify CERT1 variables and EMAIL with your names/values:
version: '3'
services:
haproxy:
container_name: lb
environment:
- CERT1=mysite.com, www.mysite.com
- CERT2=yoursite.com, www.yoursite.com
- EMAIL=my.mail
- CERT1=www.your-mysite.com
- EMAIL=your-email
- STAGING=false
volumes:
- '$PWD/data/letsencrypt:/etc/letsencrypt'
Expand All @@ -63,11 +65,22 @@ services:
networks:
- lbnet
image: nginx
rsyslog:
container_name: rsyslog
environment:
- TZ=UTC
volumes:
- '$PWD/data/rsyslog/config:/config'
networks:
- lbnet
ports:
- '514:514'
image: 'rsyslog/syslog_appliance_alpine'
networks:
lbnet:
# start containers (creates the certificate)
$ docker-compose up -d
```
Expand Down

0 comments on commit afbba2e

Please sign in to comment.