You've already forked Mailu
mirror of
https://github.com/Mailu/Mailu.git
synced 2025-08-10 22:31:47 +02:00
Add documentation about building and dev environment
This commit is contained in:
54
README.md
54
README.md
@@ -42,7 +42,7 @@ First, follow instructions at https://docs.docker.com to setup Docker and Docker
|
|||||||
Compose properly for your system. Then download the main configuration file:
|
Compose properly for your system. Then download the main configuration file:
|
||||||
|
|
||||||
```
|
```
|
||||||
wget https://freeposte.io/docker-compose.yml
|
wget https://raw.githubusercontent.com/kaiyou/freeposte.io/master/docker-compose.yml
|
||||||
```
|
```
|
||||||
|
|
||||||
This file contains instructions about which containers to run and how they will
|
This file contains instructions about which containers to run and how they will
|
||||||
@@ -53,8 +53,58 @@ as a sane default:
|
|||||||
mkdir -p /data
|
mkdir -p /data
|
||||||
```
|
```
|
||||||
|
|
||||||
Finally, you can run your mail server:
|
Otherwise, simply edit the ``docker-compose.yml`` to match your requirements. Finally, you can run your mail server:
|
||||||
|
|
||||||
```
|
```
|
||||||
docker-compose up -d
|
docker-compose up -d
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Monitoring the mail server
|
||||||
|
==========================
|
||||||
|
|
||||||
|
Logs are managed by Docker directly. You can easily read your logs using :
|
||||||
|
|
||||||
|
```
|
||||||
|
docker-compose logs
|
||||||
|
```
|
||||||
|
|
||||||
|
Docker is able to forward logs to multiple log engines. Read the following documentation or details: https://docs.docker.com/engine/admin/logging/overview/.
|
||||||
|
|
||||||
|
Building from source
|
||||||
|
====================
|
||||||
|
|
||||||
|
You can simply build all the containers from source using the ``docker-compose.yml``. First clone the Git repository:
|
||||||
|
|
||||||
|
```
|
||||||
|
git clone https://github.com/kaiyou/freeposte.io.git
|
||||||
|
```
|
||||||
|
|
||||||
|
Then build all the images :
|
||||||
|
|
||||||
|
```
|
||||||
|
docker-compose build
|
||||||
|
```
|
||||||
|
|
||||||
|
Development environment
|
||||||
|
=======================
|
||||||
|
|
||||||
|
The administration Web interface requires a proper dev environment that can easily be setup using ``virtualenv`` (make sure you are using Python 3) :
|
||||||
|
|
||||||
|
```
|
||||||
|
cd admin
|
||||||
|
virtualenv .
|
||||||
|
source bin/activate
|
||||||
|
pip install -r requirements.txt
|
||||||
|
```
|
||||||
|
|
||||||
|
You can then export the path to the development database:
|
||||||
|
|
||||||
|
```
|
||||||
|
export SQLALCHEMY_DATABASE_URI=sqlite:///path/to/dev.db
|
||||||
|
```
|
||||||
|
|
||||||
|
And finally run the server with debug enabled:
|
||||||
|
|
||||||
|
```
|
||||||
|
python run.py
|
||||||
|
```
|
||||||
|
@@ -1,60 +1,70 @@
|
|||||||
http:
|
version: '2'
|
||||||
build: nginx
|
|
||||||
env_file: freeposte.env
|
|
||||||
ports:
|
|
||||||
- "80:80"
|
|
||||||
- "443:443"
|
|
||||||
links:
|
|
||||||
- admin:admin
|
|
||||||
- webmail:webmail
|
|
||||||
volumes:
|
|
||||||
- /tmp/data/certs:/certs
|
|
||||||
|
|
||||||
imap:
|
services:
|
||||||
build: dovecot
|
|
||||||
env_file: freeposte.env
|
|
||||||
ports:
|
|
||||||
- "143:143"
|
|
||||||
- "993:993"
|
|
||||||
volumes:
|
|
||||||
- /tmp/data/freeposte:/data
|
|
||||||
- /tmp/data/mail:/mail
|
|
||||||
- /tmp/data/certs:/certs
|
|
||||||
|
|
||||||
smtp:
|
http:
|
||||||
build: postfix
|
build: nginx
|
||||||
env_file: freeposte.env
|
image: freeposte/reverse-proxy
|
||||||
ports:
|
env_file: freeposte.env
|
||||||
- "25:25"
|
ports:
|
||||||
- "465:465"
|
- "80:80"
|
||||||
- "587:587"
|
- "443:443"
|
||||||
links:
|
links:
|
||||||
- filter:lmtp
|
- admin:admin
|
||||||
- imap:sasl
|
- webmail:webmail
|
||||||
volumes:
|
volumes:
|
||||||
- /tmp/data/freeposte:/data
|
- /data/certs:/certs
|
||||||
- /tmp/data/logs:/logs
|
|
||||||
- /tmp/data/certs:/certs
|
|
||||||
|
|
||||||
filter:
|
imap:
|
||||||
build: amavis
|
build: dovecot
|
||||||
env_file: freeposte.env
|
image: freeposte/dovecot
|
||||||
links:
|
env_file: freeposte.env
|
||||||
- imap:lmtp
|
ports:
|
||||||
volumes:
|
- "143:143"
|
||||||
- /tmp/data/filter:/data
|
- "993:993"
|
||||||
|
volumes:
|
||||||
|
- /data/freeposte:/data
|
||||||
|
- /data/mail:/mail
|
||||||
|
- /data/certs:/certs
|
||||||
|
|
||||||
admin:
|
smtp:
|
||||||
build: admin
|
build: postfix
|
||||||
env_file: freeposte.env
|
image: freeposte/postfix
|
||||||
volumes:
|
env_file: freeposte.env
|
||||||
- /tmp/data/freeposte:/data
|
ports:
|
||||||
|
- "25:25"
|
||||||
|
- "465:465"
|
||||||
|
- "587:587"
|
||||||
|
links:
|
||||||
|
- filter:lmtp
|
||||||
|
- imap:sasl
|
||||||
|
volumes:
|
||||||
|
- /data/freeposte:/data
|
||||||
|
- /data/logs:/logs
|
||||||
|
- /data/certs:/certs
|
||||||
|
|
||||||
webmail:
|
filter:
|
||||||
build: roundcube
|
build: amavis
|
||||||
env_file: freeposte.env
|
image: freeposte/amavis
|
||||||
links:
|
env_file: freeposte.env
|
||||||
- imap:imap
|
links:
|
||||||
- smtp:smtp
|
- imap:lmtp
|
||||||
volumes:
|
volumes:
|
||||||
- /tmp/data/webmail:/data
|
- /data/filter:/data
|
||||||
|
|
||||||
|
admin:
|
||||||
|
build: admin
|
||||||
|
image: freeposte/admin
|
||||||
|
env_file: freeposte.env
|
||||||
|
volumes:
|
||||||
|
- /data/freeposte:/data
|
||||||
|
|
||||||
|
webmail:
|
||||||
|
build: roundcube
|
||||||
|
image: freeposte/roundcube
|
||||||
|
env_file: freeposte.env
|
||||||
|
links:
|
||||||
|
- imap:imap
|
||||||
|
- smtp:smtp
|
||||||
|
volumes:
|
||||||
|
- /data/webmail:/data
|
||||||
|
Reference in New Issue
Block a user