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:
```
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
@ -53,8 +53,58 @@ as a sane default:
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
```
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:
build: nginx
image: freeposte/reverse-proxy
env_file: freeposte.env
ports:
- "80:80"
@ -8,21 +13,23 @@ http:
- admin:admin
- webmail:webmail
volumes:
- /tmp/data/certs:/certs
- /data/certs:/certs
imap:
build: dovecot
image: freeposte/dovecot
env_file: freeposte.env
ports:
- "143:143"
- "993:993"
volumes:
- /tmp/data/freeposte:/data
- /tmp/data/mail:/mail
- /tmp/data/certs:/certs
- /data/freeposte:/data
- /data/mail:/mail
- /data/certs:/certs
smtp:
build: postfix
image: freeposte/postfix
env_file: freeposte.env
ports:
- "25:25"
@ -32,29 +39,32 @@ smtp:
- filter:lmtp
- imap:sasl
volumes:
- /tmp/data/freeposte:/data
- /tmp/data/logs:/logs
- /tmp/data/certs:/certs
- /data/freeposte:/data
- /data/logs:/logs
- /data/certs:/certs
filter:
build: amavis
image: freeposte/amavis
env_file: freeposte.env
links:
- imap:lmtp
volumes:
- /tmp/data/filter:/data
- /data/filter:/data
admin:
build: admin
image: freeposte/admin
env_file: freeposte.env
volumes:
- /tmp/data/freeposte:/data
- /data/freeposte:/data
webmail:
build: roundcube
image: freeposte/roundcube
env_file: freeposte.env
links:
- imap:imap
- smtp:smtp
volumes:
- /tmp/data/webmail:/data
- /data/webmail:/data

Loading…
Cancel
Save