mmoo9154

docker-compose.yml and .env

May 8th, 2018
385
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.59 KB | None | 0 0
  1. #-------------------------------------------.env-------------------------------------
  2. # Mailu main configuration file
  3. #
  4. # Most configuration variables can be modified through the Web interface,
  5. # these few settings must however be configured before starting the mail
  6. # server and require a restart upon change.
  7.  
  8. ###################################
  9. # Common configuration variables
  10. ###################################
  11.  
  12. # Set this to the path where Mailu data and configuration is stored
  13. ROOT=/mailu
  14.  
  15. # Mailu version to run (1.0, 1.1, etc. or master)
  16. VERSION=1.5
  17.  
  18. # Set to a randomly generated 16 bytes string
  19. SECRET_KEY=15dfd47d65b7dfdfe98d920e6b2c7f5b
  20.  
  21. # Address where listening ports should bind
  22. BIND_ADDRESS4=192.161.171.220
  23. BIND_ADDRESS6=::
  24.  
  25. # Main mail domain
  26. DOMAIN=rescopa.com
  27.  
  28. # Hostnames for this server, separated with comas
  29. HOSTNAMES=rescopa.com,mail.rescopa.com
  30.  
  31. # Postmaster local part (will append the main mail domain)
  32. POSTMASTER=postmaster
  33.  
  34. # Choose how secure connections will behave (value: letsencrypt, cert, notls, mail)
  35. TLS_FLAVOR=letsencrypt
  36.  
  37. # Authentication rate limit (per source IP address)
  38. AUTH_RATELIMIT=10/minute;1000/hour
  39.  
  40. # Opt-out of statistics, replace with "True" to opt out
  41. DISABLE_STATISTICS=False
  42.  
  43. ###################################
  44. # Optional features
  45. ###################################
  46.  
  47. # Expose the admin interface (value: true, false)
  48. ADMIN=true
  49.  
  50. # Choose which webmail to run if any (values: roundcube, rainloop, none)
  51. WEBMAIL=roundcube
  52.  
  53. # Dav server implementation (value: radicale, none)
  54. WEBDAV=none
  55.  
  56. # Antivirus solution (value: clamav, none)
  57. ANTIVIRUS=none
  58.  
  59. ###################################
  60. # Mail settings
  61. ###################################
  62.  
  63. # Message size limit in bytes
  64. # Default: accept messages up to 50MB
  65. MESSAGE_SIZE_LIMIT=50000000
  66.  
  67. # Networks granted relay permissions, make sure that you include your Docker
  68. # internal network (default to 172.17.0.0/16)
  69. RELAYNETS=172.16.0.0/12
  70.  
  71. # Will relay all outgoing mails if configured
  72. RELAYHOST=
  73.  
  74. # Fetchmail delay
  75. FETCHMAIL_DELAY=600
  76.  
  77. # Recipient delimiter, character used to delimiter localpart from custom address part
  78. # e.g. localpart+custom@domain;tld
  79. RECIPIENT_DELIMITER=+
  80.  
  81. # DMARC rua and ruf email
  82. DMARC_RUA=admin
  83. DMARC_RUF=admin
  84.  
  85. # Weclome email, enable and set a topic and body if you wish to send welcome
  86. # emails to all users.
  87. WELCOME=false
  88. WELCOME_SUBJECT=Welcome to your new email account
  89. WELCOME_BODY=Welcome to your new email account, if you can read this, then it is configured properly!
  90.  
  91. ###################################
  92. # Web settings
  93. ###################################
  94.  
  95. # Path to the admin interface if enabled
  96. WEB_ADMIN=/admin
  97.  
  98. # Path to the webmail if enabled
  99. WEB_WEBMAIL=/webmail
  100.  
  101. # Website name
  102. SITENAME=Mailu
  103.  
  104. # Linked Website URL
  105. WEBSITE=https://rescopa.com
  106.  
  107. ###################################
  108. # Advanced settings
  109. ###################################
  110.  
  111. # Docker-compose project name, this will prepended to containers names.
  112. COMPOSE_PROJECT_NAME=mailu
  113.  
  114. # Default password scheme used for newly created accounts and changed passwords
  115. # (value: SHA512-CRYPT, SHA256-CRYPT, MD5-CRYPT, CRYPT)
  116. PASSWORD_SCHEME=SHA512-CRYPT
  117. #--------------------------docker-compose.yml-------------------------------------
  118. version: '2'
  119.  
  120. services:
  121.  
  122. front:
  123. image: mailu/nginx:$VERSION
  124. restart: always
  125. env_file: .env
  126. ports:
  127. - "$BIND_ADDRESS4:80:80"
  128. - "$BIND_ADDRESS4:443:443"
  129. - "$BIND_ADDRESS4:110:110"
  130. - "$BIND_ADDRESS4:143:143"
  131. - "$BIND_ADDRESS4:993:993"
  132. - "$BIND_ADDRESS4:995:995"
  133. - "$BIND_ADDRESS4:25:25"
  134. - "$BIND_ADDRESS4:465:465"
  135. - "$BIND_ADDRESS4:587:587"
  136. # - "$BIND_ADDRESS6:80:80"
  137. # - "$BIND_ADDRESS6:443:443"
  138. # - "$BIND_ADDRESS6:110:110"
  139. # - "$BIND_ADDRESS6:143:143"
  140. # - "$BIND_ADDRESS6:993:993"
  141. # - "$BIND_ADDRESS6:995:995"
  142. # - "$BIND_ADDRESS6:25:25"
  143. # - "$BIND_ADDRESS6:465:465"
  144. # - "$BIND_ADDRESS6:587:587"
  145. volumes:
  146. - "$ROOT/certs:/certs"
  147.  
  148. redis:
  149. image: redis:alpine
  150. restart: always
  151. volumes:
  152. - "$ROOT/redis:/data"
  153.  
  154. imap:
  155. image: mailu/dovecot:$VERSION
  156. restart: always
  157. env_file: .env
  158. volumes:
  159. - "$ROOT/data:/data"
  160. - "$ROOT/mail:/mail"
  161. - "$ROOT/overrides:/overrides"
  162. depends_on:
  163. - front
  164.  
  165. smtp:
  166. image: mailu/postfix:$VERSION
  167. restart: always
  168. env_file: .env
  169. volumes:
  170. - "$ROOT/data:/data"
  171. - "$ROOT/overrides:/overrides"
  172. depends_on:
  173. - front
  174.  
  175. antispam:
  176. image: mailu/rspamd:$VERSION
  177. restart: always
  178. env_file: .env
  179. volumes:
  180. - "$ROOT/filter:/var/lib/rspamd"
  181. - "$ROOT/dkim:/dkim"
  182. - "$ROOT/overrides/rspamd:/etc/rspamd/override.d"
  183. depends_on:
  184. - front
  185.  
  186. antivirus:
  187. image: mailu/$ANTIVIRUS:$VERSION
  188. restart: always
  189. env_file: .env
  190. volumes:
  191. - "$ROOT/filter:/data"
  192.  
  193. webdav:
  194. image: mailu/$WEBDAV:$VERSION
  195. restart: always
  196. env_file: .env
  197. volumes:
  198. - "$ROOT/dav:/data"
  199.  
  200. admin:
  201. image: mailu/admin:$VERSION
  202. restart: always
  203. env_file: .env
  204. volumes:
  205. - "$ROOT/data:/data"
  206. - "$ROOT/dkim:/dkim"
  207. - /var/run/docker.sock:/var/run/docker.sock:ro
  208. depends_on:
  209. - redis
  210.  
  211. webmail:
  212. image: "mailu/$WEBMAIL:$VERSION"
  213. restart: always
  214. env_file: .env
  215. volumes:
  216. - "$ROOT/webmail:/data"
  217.  
  218. fetchmail:
  219. image: mailu/fetchmail:$VERSION
  220. restart: always
  221. env_file: .env
  222. volumes:
  223. - "$ROOT/data:/data"
Advertisement
Add Comment
Please, Sign In to add comment