help run mox with docker

in the Dockerfile, allow running on privileged ports and expose those ports.

add a docker-compose.yml with instructions for the quickstart.

fix running imaptest somewhat. after a short while it will hit the rate limiter.

in quickstart, recognize we are running under docker, and print slightly
different commands to set permissions, and skip generating the systemd service
file. als fix cleaning up the right paths during failure in quickstart.

for issue #3
This commit is contained in:
Mechiel Lukkien
2023-02-24 14:16:51 +01:00
parent 210fd34702
commit b1dcd73ebe
8 changed files with 104 additions and 34 deletions

View File

@ -1,7 +1,9 @@
version: '3.7'
services:
mox:
build: .
build:
context: .
dockerfile: Dockerfile.moximaptest
user: ${MOX_UID}:${MOX_GID}
volumes:
- ./testdata/imaptest/data:/mox/data
@ -9,7 +11,8 @@ services:
- ./testdata/imaptest/domains.conf:/mox/domains.conf
- ./testdata/imaptest/imaptest.mbox:/mox/imaptest.mbox
working_dir: /mox
command: sh -c 'echo testtest | ./mox setaccountpassword mjl@mox.example && ./mox serve'
tty: true # For job control
command: sh -c 'export MOXCONF=mox.conf; set -m; mox serve & sleep 1; echo testtest | mox setaccountpassword mjl@mox.example; fg'
healthcheck:
test: netstat -nlt | grep ':1143 '
interval: 1s