Do not change service names

master
andryyy 2017-01-03 10:33:06 +01:00
parent b53df6e088
commit 2c822accb8
2 changed files with 71 additions and 35 deletions

View File

@ -1,7 +1,7 @@
version: '2' version: '2'
services: services:
pdns: pdns-mailcow:
image: andryyy/mailcow-dockerized:pdns image: andryyy/mailcow-dockerized:pdns
volumes: volumes:
- ./data/conf/pdns/:/etc/powerdns/ - ./data/conf/pdns/:/etc/powerdns/
@ -9,11 +9,13 @@ services:
networks: networks:
mailcow-network: mailcow-network:
ipv4_address: 172.22.1.254 ipv4_address: 172.22.1.254
aliases:
- pdns
mysql: mysql-mailcow:
image: mariadb:10.1 image: mariadb:10.1
depends_on: depends_on:
- pdns - pdns-mailcow
command: mysqld command: mysqld
volumes: volumes:
- mysql-vol-1:/var/lib/mysql/ - mysql-vol-1:/var/lib/mysql/
@ -29,11 +31,13 @@ services:
restart: always restart: always
networks: networks:
mailcow-network: mailcow-network:
aliases:
- mysql
redis: redis-mailcow:
image: redis image: redis
depends_on: depends_on:
- pdns - pdns-mailcow
volumes: volumes:
- redis-vol-1:/data/ - redis-vol-1:/data/
restart: always restart: always
@ -42,11 +46,13 @@ services:
dns_search: mailcow-network dns_search: mailcow-network
networks: networks:
mailcow-network: mailcow-network:
aliases:
- redis
rspamd: rspamd-mailcow:
image: andryyy/mailcow-dockerized:rspamd image: andryyy/mailcow-dockerized:rspamd
depends_on: depends_on:
- pdns - pdns-mailcow
volumes: volumes:
- ./data/conf/rspamd/override.d/:/etc/rspamd/override.d:ro - ./data/conf/rspamd/override.d/:/etc/rspamd/override.d:ro
- ./data/conf/rspamd/local.d/:/etc/rspamd/local.d:ro - ./data/conf/rspamd/local.d/:/etc/rspamd/local.d:ro
@ -58,11 +64,13 @@ services:
dns_search: mailcow-network dns_search: mailcow-network
networks: networks:
mailcow-network: mailcow-network:
aliases:
- rspamd
phpfpm: php-fpm-mailcow:
image: andryyy/mailcow-dockerized:phpfpm image: andryyy/mailcow-dockerized:phpfpm
depends_on: depends_on:
- pdns - pdns-mailcow
volumes: volumes:
- ./data/web:/web:ro - ./data/web:/web:ro
- ./data/conf/rspamd/dynmaps:/dynmaps:ro - ./data/conf/rspamd/dynmaps:/dynmaps:ro
@ -79,12 +87,14 @@ services:
restart: always restart: always
networks: networks:
mailcow-network: mailcow-network:
aliases:
- phpfpm
sogo: sogo-mailcow:
image: andryyy/mailcow-dockerized:sogo image: andryyy/mailcow-dockerized:sogo
depends_on: depends_on:
- pdns - pdns-mailcow
- mysql - mysql-mailcow
environment: environment:
- DBNAME=${DBNAME} - DBNAME=${DBNAME}
- DBUSER=${DBUSER} - DBUSER=${DBUSER}
@ -95,14 +105,17 @@ services:
dns_search: mailcow-network dns_search: mailcow-network
volumes: volumes:
- ./data/conf/sogo/:/etc/sogo/ - ./data/conf/sogo/:/etc/sogo/
- /usr/lib/GNUstep/SOGo/WebServerResources/
restart: always restart: always
networks: networks:
mailcow-network: mailcow-network:
aliases:
- sogo
rmilter: rmilter-mailcow:
image: andryyy/mailcow-dockerized:rmilter image: andryyy/mailcow-dockerized:rmilter
depends_on: depends_on:
- pdns - pdns-mailcow
volumes: volumes:
- ./data/conf/rmilter/:/etc/rmilter.conf.d/:ro - ./data/conf/rmilter/:/etc/rmilter.conf.d/:ro
restart: always restart: always
@ -111,27 +124,29 @@ services:
dns_search: mailcow-network dns_search: mailcow-network
networks: networks:
mailcow-network: mailcow-network:
aliases:
- rmilter
dovecot: dovecot-mailcow:
image: andryyy/mailcow-dockerized:dovecot image: andryyy/mailcow-dockerized:dovecot
depends_on: depends_on:
- pdns - pdns-mailcow
volumes: volumes:
- ./data/conf/dovecot:/etc/dovecot - ./data/conf/dovecot:/etc/dovecot
- ./data/assets/ssl:/etc/ssl/mail/:ro - ./data/assets/ssl:/etc/ssl/mail/:ro
- vmail-vol-1:/var/vmail - vmail-vol-1:/var/vmail
volumes_from: volumes_from:
- sogo - sogo-mailcow
environment: environment:
- DBNAME=${DBNAME} - DBNAME=${DBNAME}
- DBUSER=${DBUSER} - DBUSER=${DBUSER}
- DBPASS=${DBPASS} - DBPASS=${DBPASS}
ports: ports:
- "143:143" - "${IMAP_PORT}:143"
- "993:993" - "${IMAPS_PORT}:993"
- "110:110" - "${POP_PORT}:110"
- "995:995" - "${POPS_PORT}:995"
- "4190:4190" - "${SIEVE_PORT}:4190"
dns: dns:
- 172.22.1.254 - 172.22.1.254
dns_search: mailcow-network dns_search: mailcow-network
@ -139,11 +154,13 @@ services:
hostname: ${MAILCOW_HOSTNAME} hostname: ${MAILCOW_HOSTNAME}
networks: networks:
mailcow-network: mailcow-network:
aliases:
- dovecot
postfix: postfix-mailcow:
image: andryyy/mailcow-dockerized:postfix image: andryyy/mailcow-dockerized:postfix
depends_on: depends_on:
- pdns - pdns-mailcow
volumes: volumes:
- ./data/conf/postfix:/opt/postfix/conf - ./data/conf/postfix:/opt/postfix/conf
- ./data/assets/ssl:/etc/ssl/mail/:ro - ./data/assets/ssl:/etc/ssl/mail/:ro
@ -152,9 +169,9 @@ services:
- DBUSER=${DBUSER} - DBUSER=${DBUSER}
- DBPASS=${DBPASS} - DBPASS=${DBPASS}
ports: ports:
- "25:25" - "${SMTP_PORT}:25"
- "465:465" - "${SMTPS_PORT}:465"
- "587:587" - "${SUBMISSION_PORT}:587"
restart: always restart: always
hostname: ${MAILCOW_HOSTNAME} hostname: ${MAILCOW_HOSTNAME}
dns: dns:
@ -162,27 +179,31 @@ services:
dns_search: mailcow-network dns_search: mailcow-network
networks: networks:
mailcow-network: mailcow-network:
aliases:
- postfix
memcached: memcached-mailcow:
image: memcached image: memcached
depends_on: depends_on:
- pdns - pdns-mailcow
restart: always restart: always
dns: dns:
- 172.22.1.254 - 172.22.1.254
dns_search: mailcow-network dns_search: mailcow-network
networks: networks:
mailcow-network: mailcow-network:
aliases:
- memcached
nginx: nginx-mailcow:
depends_on: depends_on:
- mysql - mysql-mailcow
- sogo - sogo-mailcow
- phpfpm - php-fpm-mailcow
- rspamd - rspamd-mailcow
image: nginx:mainline image: nginx:mainline
volumes_from: volumes_from:
- sogo - sogo-mailcow
volumes: volumes:
- ./data/web:/web:ro - ./data/web:/web:ro
- ./data/conf/rspamd/dynmaps:/dynmaps:ro - ./data/conf/rspamd/dynmaps:/dynmaps:ro
@ -196,6 +217,8 @@ services:
restart: always restart: always
networks: networks:
mailcow-network: mailcow-network:
aliases:
- nginx
networks: networks:
mailcow-network: mailcow-network:

13
generate_config.sh 100755 → 100644
View File

@ -29,6 +29,7 @@ MAILCOW_HOSTNAME=${MAILCOW_HOSTNAME}
# ------------------------------ # ------------------------------
DBNAME=mailcow DBNAME=mailcow
DBUSER=mailcow DBUSER=mailcow
# Please use long, random alphanumeric strings (A-Za-z0-9) # Please use long, random alphanumeric strings (A-Za-z0-9)
DBPASS=$(</dev/urandom tr -dc A-Za-z0-9 | head -c 28) DBPASS=$(</dev/urandom tr -dc A-Za-z0-9 | head -c 28)
DBROOT=$(</dev/urandom tr -dc A-Za-z0-9 | head -c 28) DBROOT=$(</dev/urandom tr -dc A-Za-z0-9 | head -c 28)
@ -36,5 +37,17 @@ DBROOT=$(</dev/urandom tr -dc A-Za-z0-9 | head -c 28)
# ------------------------------ # ------------------------------
# Misc configuration # Misc configuration
# ------------------------------ # ------------------------------
# You should leave that alone
# Can also be 11.22.33.44:25 or 0.0.0.0:465 etc. for specific bindings
SMTP_PORT=25
SMTPS_PORT=465
SUBMISSION_PORT=587
IMAP_PORT=143
IMAPS_PORT=993
POP_PORT=110
POPS_PORT=995
SIEVE_PORT=4190
# Your timezone
TZ=${TZ} TZ=${TZ}
EOF EOF