Add documentation about building and dev environment

master
Pierre Jaury 9 years ago
parent 96ee0ea45d
commit 1bff4cb4b3

@ -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,5 +1,10 @@
version: '2'
services:
http: http:
build: nginx build: nginx
image: freeposte/reverse-proxy
env_file: freeposte.env env_file: freeposte.env
ports: ports:
- "80:80" - "80:80"
@ -8,21 +13,23 @@ http:
- admin:admin - admin:admin
- webmail:webmail - webmail:webmail
volumes: volumes:
- /tmp/data/certs:/certs - /data/certs:/certs
imap: imap:
build: dovecot build: dovecot
image: freeposte/dovecot
env_file: freeposte.env env_file: freeposte.env
ports: ports:
- "143:143" - "143:143"
- "993:993" - "993:993"
volumes: volumes:
- /tmp/data/freeposte:/data - /data/freeposte:/data
- /tmp/data/mail:/mail - /data/mail:/mail
- /tmp/data/certs:/certs - /data/certs:/certs
smtp: smtp:
build: postfix build: postfix
image: freeposte/postfix
env_file: freeposte.env env_file: freeposte.env
ports: ports:
- "25:25" - "25:25"
@ -32,29 +39,32 @@ smtp:
- filter:lmtp - filter:lmtp
- imap:sasl - imap:sasl
volumes: volumes:
- /tmp/data/freeposte:/data - /data/freeposte:/data
- /tmp/data/logs:/logs - /data/logs:/logs
- /tmp/data/certs:/certs - /data/certs:/certs
filter: filter:
build: amavis build: amavis
image: freeposte/amavis
env_file: freeposte.env env_file: freeposte.env
links: links:
- imap:lmtp - imap:lmtp
volumes: volumes:
- /tmp/data/filter:/data - /data/filter:/data
admin: admin:
build: admin build: admin
image: freeposte/admin
env_file: freeposte.env env_file: freeposte.env
volumes: volumes:
- /tmp/data/freeposte:/data - /data/freeposte:/data
webmail: webmail:
build: roundcube build: roundcube
image: freeposte/roundcube
env_file: freeposte.env env_file: freeposte.env
links: links:
- imap:imap - imap:imap
- smtp:smtp - smtp:smtp
volumes: volumes:
- /tmp/data/webmail:/data - /data/webmail:/data

Loading…
Cancel
Save