Last post left us with working caddy / database servers / openId server stack.
Let’s continue with that and add another very important part of the whole setup: centralized logging service. We will use Datalust Seq for that, and we will start with usual: create external docker volume for seq data:
docker volume create --label reco-seq reco-seq
Update your compose.yml
: (relevant parts, whole file is here)
… and
86 - ASPNETCORE_FORWARDEDHEADERS_ENABLED=true
87 volumes:
88 - reco-authenticatomatic:/cert:ro
89 - reco-authenticatomatic:/data:rw
90 depends_on:
91 - mariadb
92
93 seq:
94 image: datalust/seq:2023.1
95 environment:
96 - ACCEPT_EULA=Y
97 - SEQ_API_CANONICALURI=https://seq.domain.com
98 volumes:
99 - reco-seq:/data
and Caddyfile
:
1{
2 auto_https disable_certs
3}
4
5*.domain.com {
6 tls /config/cert.pem /config/server.key
7
8 @mariadb host mariadb.domain.com
9
10 handle @mariadb {
11 reverse_proxy phpmysqladmin:80
12 }
13
14 @authenticatomatic host authenticatomatic.domain.com
15
16 handle @authenticatomatic {
17 reverse_proxy authenticatomatic
18 }
19
20 @seq host seq.domain.com
21
22 handle @seq {
23 reverse_proxy seq
24 }
25
26 handle {
27 respond "Hello world!"
28 }
29}
One docker compose up -d
followed with docker compose restart caddy
should bring everything to life: if you type seq.domain.com
in your browser you should see default seq page.
Next, we’ll add RabbitMQ message broker, following same pattern as usual: docker volume, service declaration in compose.yml
and proxy configuration in Caddyfile
:
docker volume create --label reco-rabbitmq reco-rabbitmq
Added those lines to compose.yml
(whole file is here)
16 external: true
17 reco-rabbitmq:
18 external: true
19
20services:
and
103 rabbit:
104 image: rabbitmq:3-management
105 volumes:
106 - reco-rabbitmq:/var/lib/rabbitmq
Caddyfile
additional config (again, whole file):
26 @rabbit host rabbit.domain.com
27
28 handle @rabbit {
29 reverse_proxy rabbit:15672
30 }
Once again docker compose up -d
(and, if docker stack was already running, docker compose restart caddy
) should bring another service to life: https://rabbit.domain.com should be available.