mirror of
https://gitlab.com/ric_harvey/MailHog.git
synced 2024-11-23 22:34:04 +00:00
Fix #16 (on the right branch this time!)
This commit is contained in:
parent
537f51a6f6
commit
fb29858e46
3 changed files with 61 additions and 21 deletions
14
CONFIG.md
Normal file
14
CONFIG.md
Normal file
|
@ -0,0 +1,14 @@
|
|||
Configuring MailHog
|
||||
===================
|
||||
|
||||
You can configure Go-MailHog using command line options or environment variables:
|
||||
|
||||
| Environment | Command line | Default | Description
|
||||
| ------------------- | ------------- | --------------- | -----------
|
||||
| MH_HOSTNAME | -hostname | mailhog.example | Hostname to use for EHLO/HELO and message IDs
|
||||
| MH_HTTP_BIND_ADDR | -httpbindaddr | 0.0.0.0:8025 | Interface and port for HTTP server to bind to
|
||||
| MH_MONGO_COLLECTION | -mongocoll | messages | MongoDB collection name for message storage
|
||||
| MH_MONGO_DB | -mongodb | mailhog | MongoDB database name for message storage
|
||||
| MH_MONGO_URI | -mongouri | 127.0.0.1:27017 | MongoDB host and port
|
||||
| MH_SMTP_BIND_ADDR | -smtpbindaddr | 0.0.0.0:1025 | Interface and port for SMTP server to bind to
|
||||
| MH_STORAGE | -storage | memory | Set message storage: memory / mongodb
|
40
DEPLOY.md
Normal file
40
DEPLOY.md
Normal file
|
@ -0,0 +1,40 @@
|
|||
Deploying MailHog
|
||||
=================
|
||||
|
||||
### Command line
|
||||
|
||||
You can run MailHog locally from the command line.
|
||||
|
||||
go get github.com/ian-kent/MailHog/MailHog
|
||||
MailHog
|
||||
|
||||
To configure MailHog, use the environment variables or command line flags
|
||||
described in the [README](README.md).
|
||||
|
||||
### Using supervisord/upstart/etc
|
||||
|
||||
MailHog can be started as a daemon using supervisord/upstart/etc.
|
||||
|
||||
See [this example init script](https://github.com/geerlingguy/ansible-role-mailhog/blob/master/files/mailhog)
|
||||
and [this Ansible role](https://github.com/geerlingguy/ansible-role-mailhog) by [geerlingguy](https://github.com/geerlingguy).
|
||||
|
||||
### Docker
|
||||
|
||||
The example [Dockerfile](Dockerfile) can be used to run MailHog in a [Docker](https://www.docker.com/) container.
|
||||
|
||||
### Elastic Beanstalk
|
||||
|
||||
You can deploy Go-MailHog using [AWS Elastic Beanstalk](http://aws.amazon.com/elasticbeanstalk/).
|
||||
|
||||
1. Open the Elastic Beanstalk console
|
||||
2. Create a zip file containing the Dockerfile and MailHog binary
|
||||
3. Create a new Elastic Beanstalk application
|
||||
4. Launch a new environment and upload the zip file
|
||||
|
||||
If you're using in-memory storage, you can only use a single instance of
|
||||
Go-MailHog. To use a load balanced EB application, use MongoDB backed storage.
|
||||
|
||||
To configure your Elastic Beanstalk MailHog instance, either:
|
||||
|
||||
* Set environment variables using the Elastic Beanstalk console
|
||||
* Edit the Dockerfile to pass in command line arguments
|
28
README.md
28
README.md
|
@ -13,13 +13,13 @@ Go was chosen for portability - MailHog runs without installation on multiple pl
|
|||
|
||||
### Getting started
|
||||
|
||||
Either:
|
||||
|
||||
* [Download the latest release](RELEASES.md) of Go-MailHog for your platform
|
||||
* Use Docker or AWS Elastic Beanstalk to deploy Go-MailHog with the example [Dockerfile](Dockerfile)
|
||||
|
||||
By default, the SMTP server will start on port 1025, the HTTP server will start
|
||||
on port 8025, and in-memory message storage will be used.
|
||||
1. Either:
|
||||
* [Download the latest release](RELEASES.md) of Go-MailHog for your platform
|
||||
* [Read the deployment guide](DEPLOY.md) for other deployment options
|
||||
2. [Configure MailHog](CONFIG.md), or use the default settings:
|
||||
* the SMTP server will start on port 1025
|
||||
* the HTTP server will start on port 8025
|
||||
* in-memory message storage will be used.
|
||||
|
||||
### Features
|
||||
|
||||
|
@ -40,20 +40,6 @@ on port 8025, and in-memory message storage will be used.
|
|||
|
||||
![Screenshot of MailHog web interface](/images/MailHog.png "MailHog web interface")
|
||||
|
||||
### Configuration
|
||||
|
||||
You can configure Go-MailHog using command line options or environment variables:
|
||||
|
||||
| Environment | Command line | Default | Description
|
||||
| ------------------- | ------------- | --------------- | -----------
|
||||
| MH_HOSTNAME | -hostname | mailhog.example | Hostname to use for EHLO/HELO and message IDs
|
||||
| MH_HTTP_BIND_ADDR | -httpbindaddr | 0.0.0.0:8025 | Interface and port for HTTP server to bind to
|
||||
| MH_MONGO_COLLECTION | -mongocoll | messages | MongoDB collection name for message storage
|
||||
| MH_MONGO_DB | -mongodb | mailhog | MongoDB database name for message storage
|
||||
| MH_MONGO_URI | -mongouri | 127.0.0.1:27017 | MongoDB host and port
|
||||
| MH_SMTP_BIND_ADDR | -smtpbindaddr | 0.0.0.0:1025 | Interface and port for SMTP server to bind to
|
||||
| MH_STORAGE | -storage | memory | Set message storage: memory / mongodb
|
||||
|
||||
### Contributing
|
||||
|
||||
Clone this repository to ```$GOPATH/src/github.com/ian-kent/Go-MailHog``` and type ```make deps```.
|
||||
|
|
Loading…
Reference in a new issue