Open platform to collect and prioritize feedback
tooling: add fake SMTP server to docker-compose (#770)
Renann Prado4d59c0aa764b
diff --git a/.example.env b/.example.envindex 7e64a71cf..4655d8aea 100644--- a/.example.env+++ b/.example.env@@ -20,11 +20,11 @@ OAUTH_GITHUB_SECRET=-EMAIL_MAILGUN_API=-EMAIL_MAILGUN_DOMAIN=-EMAIL_MAILGUN_REGION=US+#EMAIL_MAILGUN_API=+#EMAIL_MAILGUN_DOMAIN=+#EMAIL_MAILGUN_REGION=US-EMAIL_SMTP_HOST=smtp.yourdomain.com-EMAIL_SMTP_PORT=587+EMAIL_SMTP_HOST=localhost+EMAIL_SMTP_PORT=1026EMAIL_SMTP_USERNAME=EMAIL_SMTP_PASSWORD=diff --git a/CONTRIBUTING.md b/CONTRIBUTING.mdindex 9d240367f..25d53de53 100644--- a/CONTRIBUTING.md+++ b/CONTRIBUTING.md@@ -31,10 +31,15 @@ If you know these technologies or would like to learn them, lucky you! This is t1. if it's your first time using Go, ensure that have your `GOPATH` and `PATH` variables correctly setup. This guide can help you on that https://golang.org/doc/code.html#GOPATH2. clone the repository into `$GOPATH/src/github.com/getfider/fider`.3. run `npm install` to install client side packages .-4. run `docker-compose up -d` to start a local PostgreSQL database on Docker.+4. run `docker-compose up -d` to start a local PostgreSQL database and Local SMTP (with [MailHog](https://github.com/mailhog/MailHog)) on Docker.5. run `cp .example.env .env` to create a local environment configuration file.-- **Important:** Fider has a strong dependency on an email delivery service. You'll need to edit `.env` file and configure the `EMAIL_*` environment variables with your own SMTP server details. If you don't have an SMTP server, you can either sign up for a [Mailgun account](https://www.mailgun.com/) (it's Free) or sign up for a [Mailtrap account](https://mailtrap.io), which is a free SMTP mocking server. If you prefer not to setup an email service, keep an eye on the server logs. Sometimes it's necessary to navigate to some URLs that are only sent by email, but are also written to the logs.+- **Important:** Fider has a strong dependency on an email delivery service. For easier local development, the docker-compose file already provides+a fake SMTP server running at port **1026** and a UI (to check sent emails) at http://localhost:8026. The `.example.env` is already+configured to use it. If you want to, you can edit `.env` file and configure the `EMAIL_*` environment variables with your own SMTP server+details. If you don't have an SMTP server, you can either sign up for a [Mailgun account](https://www.mailgun.com/) (it's Free) or sign+up for a [Mailtrap account](https://mailtrap.io), which is a free SMTP mocking server. If you prefer not to setup an email service, keep+an eye on the server logs. Sometimes it's necessary to navigate to some URLs that are only sent by email, but are also written to the logs.#### 3. To start the applicationdiff --git a/docker-compose.yml b/docker-compose.ymlindex 9a48e8058..7f2cc2461 100644--- a/docker-compose.yml+++ b/docker-compose.yml@@ -1,5 +1,10 @@-version: '2'+version: '3'services:+ smtp:+ image: mailhog/mailhog:latest+ ports:+ - "8026:8025"+ - "1026:1025"pgdev:container_name: fider_pgdevrestart: always