-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix #16 (on the right branch this time!)
- Loading branch information
Showing
3 changed files
with
61 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters