Skip to content

Latest commit

 

History

History
55 lines (30 loc) · 858 Bytes

File metadata and controls

55 lines (30 loc) · 858 Bytes

Quickstart

1) Prepare config

Copy the template:

cp midemail.env.example midemail.env

Set at least:

  • DATABASE_URL
  • JWT_SECRET
  • REDIS_ADDR

2) Apply migrations

go run ./cmd/migrate up

3) Start core services

In separate terminals:

go run ./cmd/api

go run ./cmd/smtp-inbound

go run ./cmd/smtp-submission

go run ./cmd/imap

go run ./cmd/autoconfig

go run ./cmd/orchestrator

go run ./cmd/mail-worker

4) Verify APIs

  • GET /auth/google/url
  • POST /push/devices/register
  • GET /domains/export?domain=example.com

Docker quickstart

Build:

docker build -t midemail:latest .

Run API:

docker run --rm --env-file midemail.env -e MIDEMAIL_SERVICE=api midemail:latest

Run migrations:

docker run --rm --env-file midemail.env -e MIDEMAIL_SERVICE=migrate -e MIDEMAIL_MIGRATE_ARGS=up midemail:latest