123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149 |
- version: "3.6"
- # Set env vars MYSQL_PASSWORD, MAIL_HOSTNAME and SSL_DOMAIN.
- # SSL certificates should be on the host machine in
- # /etc/letsencrypt/live/$SSL_DOMAIN/
- # as created by certbot
- # MYSQL_PASSWORD must be set the first time the db container is brought up, as
- # this is when the database is initialised. It must also be set whenever
- # bringing up the stack, as the containers use it at runtime.
- #
- # Once the db is created in the `db` volume you will need to use the mysql
- # command-line tools if you want to edit it.
- # MAIL_HOSTNAME should be the external host-name of the mail host itself
- # and must match reverse-dns
- volumes:
- mail:
- queue:
- redis:
- rspamd:
- rainloop:
- db:
- services:
- db:
- build:
- context: .
- dockerfile: db/Dockerfile
- restart: always
- volumes:
- - type: volume
- source: db
- target: /var/lib/mysql
- environment:
- - MYSQL_PASSWORD=${MYSQL_PASSWORD}
- haraka:
- build:
- context: .
- dockerfile: haraka/Dockerfile
- ports:
- - "25:2525"
- - "587:2525"
- restart: always
- volumes:
- - type: volume
- source: queue
- target: /haraka/queue
- - type: bind
- source: /etc/letsencrypt/live/${SSL_DOMAIN}/fullchain.pem
- target: /haraka/certs/fullchain.pem
- - type: bind
- source: /etc/letsencrypt/live/${SSL_DOMAIN}/privkey.pem
- target: /haraka/certs/privkey.pem
- environment:
- - MYSQL_PASSWORD=${MYSQL_PASSWORD}
- - MAIL_HOSTNAME=${MAIL_HOSTNAME}
- depends_on:
- - db
- dovecot:
- build:
- context: .
- dockerfile: dovecot/Dockerfile
- ports:
- - "143:10143"
- - "993:10993"
- expose:
- - "2524"
- restart: always
- volumes:
- - type: volume
- source: mail
- target: /mail
- - type: bind
- source: /etc/letsencrypt/live/${SSL_DOMAIN}/fullchain.pem
- target: /conf/ssl/fullchain.pem
- - type: bind
- source: /etc/letsencrypt/live/${SSL_DOMAIN}/privkey.pem
- target: /conf/ssl/privkey.pem
- environment:
- - MYSQL_PASSWORD=${MYSQL_PASSWORD}
- depends_on:
- - db
- redis:
- build:
- context: .
- dockerfile: redis/Dockerfile
- expose:
- - "6379"
- restart: always
- volumes:
- - type: volume
- source: redis
- target: /data
- rspamd:
- build:
- context: .
- dockerfile: rspamd/Dockerfile
- expose:
- - "11333"
- restart: always
- volumes:
- - type: volume
- source: rspamd
- target: /var/lib/rspamd
- depends_on:
- - redis
- clamav:
- build:
- context: .
- dockerfile: clamav/Dockerfile
- expose:
- - "3310"
- restart: always
- rainloop:
- build:
- context: .
- dockerfile: rainloop/Dockerfile
- volumes:
- - rainloop:/rainloop/data
- expose:
- - "8888"
- restart: always
- environment:
- - LOG_TO_STDOUT=true
- proxy:
- build:
- context: .
- dockerfile: proxy/Dockerfile
- ports:
- - "80:8080"
- - "443:8443"
- restart: always
- volumes:
- - type: bind
- source: /etc/letsencrypt/live/${SSL_DOMAIN}/fullchain.pem
- target: /etc/nginx/certs/fullchain.pem
- - type: bind
- source: /etc/letsencrypt/live/${SSL_DOMAIN}/privkey.pem
- target: /etc/nginx/certs/privkey.pem
|