README.md 1.22 KB
Newer Older
Manuel Munz's avatar
Manuel Munz committed
1
2
3
4
5
6
7
# mailcatcher

Simple fake smtp server and webinterface for testing mails in development.

## Supported tags and respective Dockerfile links

* `0.6.5`: [Dockerfile](0.6.5/Dockerfile)
Joachim Eckerlin's avatar
Joachim Eckerlin committed
8
* `0.7` `latest`: [Dockerfile](0.7/Dockerfile)
Manuel Munz's avatar
Manuel Munz committed
9
10
11
12
13
14
15
16
17
18
19
20
21
22

## Quick reference

The images are based on alpine:latest. This Dockerfile was initially taken from
[jeanberu/mailcatcher](https://hub.docker.com/r/jeanberu/mailcatcher/). What has changed is that we do not EXPOSE ports.
Remember: we open ports in docker-compose.localhost.yml / docker-compose.traefik.yml.

## Usage with docker-compose

### docker-compose.yml

```
services:
  mailcatcher:
Joachim Eckerlin's avatar
Joachim Eckerlin committed
23
    image: docker.team23.de/docker/mailcatcher:0.7
Manuel Munz's avatar
Manuel Munz committed
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56

```
### docker-compose.localhost.yml

```
services:
  # forward local port 1080 to mailcatcher:1080
  mailcatcher:
    ports:
      - 1080:1080

```

### docker-compose.traefik.yml

```
services:
  # Expose mailcatcher webinterface through traefik 
  mailcatcher:
    networks:
      - default
      - traefik_gateway
    labels:
      - traefik.enable=true
      - traefik.port=1080
      - traefik.docker.network=traefik_gateway

```


## Environment variables

- **SMTP_PORT** Change default SMTP port (default: 1025)
Joachim Eckerlin's avatar
Joachim Eckerlin committed
57
- **HTTP_PORT** Change default HTTP port (default: 1080)