Merge pull request #180 from bytesonus/master

Dockerize the repo
This commit is contained in:
Andris Reinman 2020-02-29 15:58:23 +02:00 committed by GitHub
commit ad8a9d4338
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 72 additions and 0 deletions

3
.dockerignore Normal file
View file

@ -0,0 +1,3 @@
node_modules
Dockerfile*
docker-compose*.yml

15
Dockerfile Normal file
View file

@ -0,0 +1,15 @@
FROM node:lts-alpine
RUN apk add --no-cache make git dumb-init python
WORKDIR /wildduck
COPY . .
RUN npm install --production
ENV WILDDUCK_APPDIR=/wildduck \
WILDDUCK_CONFIG=/wildduck/config/default.toml \
CMD_ARGS=""
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
CMD node ${WILDDUCK_APPDIR}/server.js --config=${WILDDUCK_CONFIG} ${CMD_ARGS}

View file

@ -96,6 +96,30 @@ See [API Docs](https://api.wildduck.email/#api-Users-PostUser) for details about
Any IMAP or POP3 client will do. Use the credentials from step 4\. to log in.
### Docker Install
The easiest way to setup wildduck with a docker image is given below, for more documentation about configuration options in the docker image, refer to
the [wiki page on the Docker](https://github.com/nodemailer/wildduck/wiki/Docker).
A docker hub image built using the [Dockerfile](./Dockerfile) in the repo is also available
To pull the latest pre-built image of wildduck:
```
docker pull nodemailer/wildduck
```
It is also possible to pull a specific version of wildduck by specifying the version as the image tag.
(example, for version 1.20):
```
docker pull nodemailer/wildduck:1.20
```
To run the docker image using the [default config](./config/default.toml), and `mongodb` and `redis` from the host machine, use:
```
docker run --network=host nodemailer/wildduck
```
## Goals of the Project
1. Build a scalable and distributed IMAP/POP3 server that uses clustered database instead of single machine file system as mail store

30
docker-compose.yml Normal file
View file

@ -0,0 +1,30 @@
version: "3.7"
services:
wildduck:
network_mode: host
build: .
ports:
- "8080:8080"
- "143:143"
- "110:110"
- "993:993"
- "995:995"
depends_on:
- redis
- mongo
redis:
network_mode: host
image: redis:alpine
volumes:
- /data
expose:
- 6379
mongo:
network_mode: host
image: mongo
restart: always
volumes:
- /data/db
ports:
- 27017