forked from the-djmaze/snappymail
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
70 lines (64 loc) · 1.45 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
version: '3.0'
services:
# Mail server running on separate image
mail:
image: tvial/docker-mailserver:latest
restart: always
domainname: example.com
volumes:
- maildata:/var/mail
- mailstate:/var/mail-state
- ./.docker/dev/mail/config/:/tmp/docker-mailserver/
environment:
- ENABLE_SPAMASSASSIN=0
- ENABLE_CLAMAV=0
- ENABLE_FAIL2BAN=0
- ENABLE_POSTGREY=0
- ENABLE_MANAGESIEVE=1
- ONE_DIR=1
- DMS_DEBUG=0
cap_add:
- NET_ADMIN
- SYS_PTRACE
# MySQL database
db:
image: mysql:5.7
hostname: db
restart: always
environment:
- MYSQL_ROOT_PASSWORD=root
- MYSQL_USER=snappymail
- MYSQL_PASSWORD=snappymail
- MYSQL_DATABASE=snappymail
volumes:
- mysql:/var/lib/mysql
# PHP FPM Server
php:
build:
context: ./.docker/dev/php
depends_on:
- db
- mail
volumes:
- ./:/var/www
- ./.docker/dev/php/snappymail.ini:/usr/local/etc/php/conf.d/snappymail.ini
# Nginx load balancer translating to PHP FPM
nginx:
image: nginx:latest
hostname: nginx
depends_on:
- php
ports:
- "${HTTPS_PORT}:443"
- "${HTTP_PORT}:80"
volumes:
- ./:/var/www
- ./.docker/dev/nginx/ssl:/etc/nginx/ssl
- ./.docker/dev/nginx/default.conf:/etc/nginx/conf.d/default.conf
volumes:
mysql:
driver: local
maildata:
driver: local
mailstate:
driver: local