Skip to content

Commit 30513be

Browse files
committed
Pass certificate and rate limiting related options to the container
1 parent ffb8a4d commit 30513be

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,6 @@ COPY --chown=nonroot:nonroot --from=builder /app/bin/dhee /app/bin/dhee
2727
COPY --chown=nonroot:nonroot --from=builder /app/data/dhee.db /app/data/dhee.db
2828
COPY --chown=nonroot:nonroot ./data/config.json /app/data/config.json
2929

30-
ENTRYPOINT ["./bin/dhee", "server", "--data-dir", "./data", "--store", "sqlite", "--address", "0.0.0.0"]
30+
CMD ["./bin/dhee", "server", "--data-dir", "./data", "--store", "sqlite", "--address", "0.0.0.0", "--certs-dir", "/app/certs", "--acme", "--rate-limit", "8"]
3131

3232
EXPOSE 8080

app/server/echo_server.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,7 @@ func StartServer(controller *DheeController, dheeConf *config.DheeConfig, server
160160
if acme {
161161
slog.Info("using TLS with ACME", "dir", certDir)
162162
e.AutoTLSManager.HostPolicy = autocert.HostWhitelist(dheeConf.Hostnames...)
163+
e.AutoTLSManager.Cache = autocert.DirCache(certDir)
163164
e.Logger.Fatal(e.StartAutoTLS(addr))
164165
} else {
165166
slog.Info("using TLS with certDir", "dir", certDir)

app/server/templ_template/home_templ.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)