mirror of
https://github.com/mjl-/mox.git
synced 2024-12-26 16:33:47 +03:00
b1dcd73ebe
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
34 lines
1 KiB
YAML
34 lines
1 KiB
YAML
version: '3.7'
|
|
services:
|
|
mox:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile.moximaptest
|
|
user: ${MOX_UID}:${MOX_GID}
|
|
volumes:
|
|
- ./testdata/imaptest/data:/mox/data
|
|
- ./testdata/imaptest/mox.conf:/mox/mox.conf
|
|
- ./testdata/imaptest/domains.conf:/mox/domains.conf
|
|
- ./testdata/imaptest/imaptest.mbox:/mox/imaptest.mbox
|
|
working_dir: /mox
|
|
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
|
|
timeout: 1s
|
|
retries: 10
|
|
|
|
imaptest:
|
|
build:
|
|
dockerfile: Dockerfile.imaptest
|
|
context: .
|
|
command: host=mox port=1143 'user=mjl@mox.example' pass=testtest mbox=/imaptest/imaptest.mbox
|
|
working_dir: /imaptest
|
|
volumes:
|
|
- ./testdata/imaptest:/imaptest
|
|
user: ${MOX_UID}:${MOX_GID}
|
|
depends_on:
|
|
mox:
|
|
condition: service_healthy
|
|
restart: never
|