Skip to content

Commit 152e18a

Browse files
committed
docs: improve deployment instructions (fixes #584)
1 parent 7d92f17 commit 152e18a

1 file changed

Lines changed: 30 additions & 19 deletions

File tree

README.md

Lines changed: 30 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -35,35 +35,46 @@ Container images are built on [Alpine Linux](https://alpinelinux.org) or vendor
3535

3636
## Installation
3737

38-
### With Docker Compose
38+
### Download
3939

40-
1. Run `git clone [email protected]:jeboehm/docker-mailserver.git`
41-
2. Copy the file `.env.dist` to `.env` and change the variables in it according to your needs.
42-
The variables are described in the [docs](docs/ENVIRONMENT_VARIABLES.md).
43-
3. Run `bin/production.sh pull` to download the images.
44-
4. Run `bin/production.sh up -d` to start the services.
45-
5. After a few seconds, you can access the services listed in the section [Ports overview](#ports-overview).
46-
6. Create your first email address and an admin user by running `bin/production.sh run --rm web setup.sh`.
47-
The wizard will ask you a few questions to set everything up.
48-
7. Now you can log in to the management interface with your new account credentials.
40+
Download the latest release from the [Releases](https://github.com/jeboehm/docker-mailserver/releases) page and unpack the archive (release-vX.X.X.tar.gz).
41+
If you are an advanced user, you can also download the source code from GitHub:
4942

50-
### On Kubernetes (K8s)
43+
```bash
44+
git clone https://github.com/jeboehm/docker-mailserver.git
45+
```
5146

52-
Kubernetes installation is a first-class citizen. You can use the `kustomization.yaml` file to deploy the mailserver to your Kubernetes cluster.
47+
Do not use the `latest` container image tag for production deployments. Use a specific version instead.
48+
For example, use `jeboehm/mailserver-mta:6.3` instead of `jeboehm/mailserver-mta:latest`.
49+
50+
### Run on Docker
51+
52+
1. Copy the file `.env.dist` to `.env` and open it in a text editor.
53+
Change the variables in it according to your needs. They are described in the [docs](docs/ENVIRONMENT_VARIABLES.md).
54+
2. To download the Docker images, run `bin/production.sh pull`.
55+
3. To start the services, run `bin/production.sh up -d --wait`. This will wait for all services to be ready before continuing.
56+
4. After a few seconds, you can access the services listed in the section [Ports overview](#ports-overview).
57+
5. Start the installation wizard by running `bin/production.sh run --rm web setup.sh`. This will ask you a few questions to set everything up and create your first email address and an admin user.
58+
6. Now you can log in to the management interface with your new account credentials.
59+
60+
### Run On Kubernetes (K8s)
61+
62+
Kubernetes deployment is fully supported. You can use the `kustomization.yaml` file to deploy the mailserver to your Kubernetes cluster.
5363

5464
**Important:** Installing on Kubernetes requires an existing MySQL-compatible database (for example, MySQL or Percona XtraDB).
5565
The provided kustomization does not provision a database. Configure the database connection in your `.env` and supply
5666
credentials as Kubernetes Secrets before applying the manifests. See the
5767
[Kustomize External Database and HTTPS Ingress Example](docs/example-configs/kustomize/external-db-and-https-ingress/README.md)
5868
and the documentation [Use another MySQL instance](docs/EXTERNAL_MYSQL.md) for details.
5969

60-
1. Run `git clone [email protected]:jeboehm/docker-mailserver.git`
61-
2. Copy the file `.env.dist` to `.env` and change the variables in it according to your needs.
62-
The variables are described in the [docs](docs/ENVIRONMENT_VARIABLES.md).
63-
3. Run `kubectl create namespace mail`
64-
4. Run `bin/create-tls-certs.sh`
65-
5. Run `kubectl create -n mail secret tls tls-certs --cert=config/tls/tls.crt --key=config/tls/tls.key`
66-
6. Run `kubectl apply -n mail -k .`
70+
1. Copy the file `.env.dist` to `.env` and open it in a text editor.
71+
Change the variables in it according to your needs. They are described in the [docs](docs/ENVIRONMENT_VARIABLES.md).
72+
2. Create a namespace for the mailserver by running `kubectl create namespace mail`.
73+
3. To create self-signed TLS certificates, run `bin/create-tls-certs.sh`. You'll need them when you don't plan to use tools like `cert-manager`.
74+
4. Create a Kubernetes secret for the TLS certificates by running `kubectl create -n mail secret tls tls-certs --cert=config/tls/tls.crt --key=config/tls/tls.key`.
75+
5. Apply the kustomize manifests by running `kubectl apply -n mail -k .`.
76+
6. When the pods are up and healthy, start the installation wizard by executing `setup.sh` in the php-fpm container of the web pod. This will ask you a few questions to set everything up and create your first email address and an admin user.
77+
7. Now you can log in to the management interface with your new account credentials on the configured ingress.
6778

6879
## Ports overview
6980

0 commit comments

Comments
 (0)