Compose: let the server listen below 1024 under podman too #80

Merged
jcoffey-dev merged 1 commits from feat/server-port-sysctl into main 2026-11-18 15:56:22 +00:00
2 changed files with 6 additions and 1 deletions

No files matched your search

+1 -1
View File
@@ -35,7 +35,7 @@ func render(t *testing.T, s *Stack) (compose, caddy string) {
func TestContainerServerIsInTheProject(t *testing.T) {
c, k := render(t, stack(false))
for _, want := range []string{"\n server:\n", "depends_on: [server]", "MAIL_SERVER_URL: http://server:8080", "inbuxa-data:/var/lib/inbuxa"} {
for _, want := range []string{"\n server:\n", "depends_on: [server]", "MAIL_SERVER_URL: http://server:8080", "inbuxa-data:/var/lib/inbuxa", "net.ipv4.ip_unprivileged_port_start: \"0\""} {
if !strings.Contains(c, want) {
t.Errorf("compose.yaml lacks %q", want)
}
@@ -26,6 +26,11 @@ services:
image: {{.ServerImage}}
hostname: {{.MailHost}}
restart: unless-stopped
# The server runs as an unprivileged user and holds no capabilities, so
# this is what lets it listen on 25, 443, 465 and 993 inside its own
# network namespace. Docker sets it already; podman doesn't.
sysctls:
net.ipv4.ip_unprivileged_port_start: "0"
ports:
- "{{.ServerBind}}:8080"
{{- if .PassThrough}}