Easier container names, allow to set HTTPS port, Typo fix

master
andryyy 2017-01-12 21:40:42 +01:00
parent ffe95ad87d
commit 89b5d9bde6
5 changed files with 38 additions and 55 deletions

View File

@ -22,7 +22,7 @@ RUN apt-get -y install dovecot-common \
syslog-ng \ syslog-ng \
syslog-ng-core \ syslog-ng-core \
ca-certificates \ ca-certificates \
supervisor \ supervisor \
wget \ wget \
curl \ curl \
build-essential \ build-essential \

View File

@ -0,0 +1 @@
listen ${HTTPS_PORT};

View File

@ -1,5 +1,5 @@
server { server {
listen 443; include /etc/nginx/conf.d/listen.active;
ssl on; ssl on;
ssl_certificate /etc/ssl/mail/cert.pem; ssl_certificate /etc/ssl/mail/cert.pem;
ssl_certificate_key /etc/ssl/mail/key.pem; ssl_certificate_key /etc/ssl/mail/key.pem;
@ -72,7 +72,7 @@ server {
proxy_set_header x-webobjects-server-protocol HTTP/1.0; proxy_set_header x-webobjects-server-protocol HTTP/1.0;
proxy_set_header x-webobjects-remote-host $remote_addr; proxy_set_header x-webobjects-remote-host $remote_addr;
proxy_set_header x-webobjects-server-name $server_name; proxy_set_header x-webobjects-server-name $server_name;
proxy_set_header x-webobjects-server-url $scheme://$host; proxy_set_header x-webobjects-server-url $scheme://$host:$server_port;
proxy_set_header x-webobjects-server-port $server_port; proxy_set_header x-webobjects-server-port $server_port;
client_body_buffer_size 128k; client_body_buffer_size 128k;
client_max_body_size 100m; client_max_body_size 100m;
@ -86,7 +86,7 @@ server {
proxy_set_header x-webobjects-server-protocol HTTP/1.0; proxy_set_header x-webobjects-server-protocol HTTP/1.0;
proxy_set_header x-webobjects-remote-host $remote_addr; proxy_set_header x-webobjects-remote-host $remote_addr;
proxy_set_header x-webobjects-server-name $server_name; proxy_set_header x-webobjects-server-name $server_name;
proxy_set_header x-webobjects-server-url $scheme://$host; proxy_set_header x-webobjects-server-url $scheme://$host:$server_port;
proxy_set_header x-webobjects-server-port $server_port; proxy_set_header x-webobjects-server-port $server_port;
#proxy_connect_timeout 90; #proxy_connect_timeout 90;
#proxy_send_timeout 90; #proxy_send_timeout 90;

View File

@ -1,7 +1,7 @@
version: '2' version: '2'
services: services:
pdns-mailcow: pdns:
image: andryyy/mailcow-dockerized:pdns image: andryyy/mailcow-dockerized:pdns
volumes: volumes:
- ./data/conf/pdns/:/etc/powerdns/ - ./data/conf/pdns/:/etc/powerdns/
@ -9,13 +9,11 @@ services:
networks: networks:
mailcow-network: mailcow-network:
ipv4_address: 172.22.1.254 ipv4_address: 172.22.1.254
aliases:
- pdns
mysql-mailcow: mysql:
image: mariadb:10.1 image: mariadb:10.1
depends_on: depends_on:
- pdns-mailcow - pdns
command: mysqld --default-time-zone="${TZ}" command: mysqld --default-time-zone="${TZ}"
volumes: volumes:
- mysql-vol-1:/var/lib/mysql/ - mysql-vol-1:/var/lib/mysql/
@ -31,13 +29,11 @@ services:
restart: always restart: always
networks: networks:
mailcow-network: mailcow-network:
aliases:
- mysql
redis-mailcow: redis:
image: redis image: redis
depends_on: depends_on:
- pdns-mailcow - pdns
volumes: volumes:
- redis-vol-1:/data/ - redis-vol-1:/data/
restart: always restart: always
@ -46,13 +42,11 @@ services:
dns_search: mailcow-network dns_search: mailcow-network
networks: networks:
mailcow-network: mailcow-network:
aliases:
- redis
rspamd-mailcow: rspamd:
image: andryyy/mailcow-dockerized:rspamd image: andryyy/mailcow-dockerized:rspamd
depends_on: depends_on:
- pdns-mailcow - pdns
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
@ -65,14 +59,12 @@ services:
dns_search: mailcow-network dns_search: mailcow-network
networks: networks:
mailcow-network: mailcow-network:
aliases:
- rspamd
php-fpm-mailcow: phpfpm:
image: andryyy/mailcow-dockerized:phpfpm image: andryyy/mailcow-dockerized:phpfpm
command: "php-fpm -d date.timezone=${TZ}" command: "php-fpm -d date.timezone=${TZ}"
depends_on: depends_on:
- pdns-mailcow - pdns
volumes: volumes:
- ./data/web:/web:ro - ./data/web:/web:ro
- ./data/conf/rspamd/dynmaps:/dynmaps:ro - ./data/conf/rspamd/dynmaps:/dynmaps:ro
@ -88,14 +80,12 @@ services:
restart: always restart: always
networks: networks:
mailcow-network: mailcow-network:
aliases:
- phpfpm
sogo-mailcow: sogo:
image: andryyy/mailcow-dockerized:sogo image: andryyy/mailcow-dockerized:sogo
depends_on: depends_on:
- pdns-mailcow - pdns
- mysql-mailcow - mysql
environment: environment:
- DBNAME=${DBNAME} - DBNAME=${DBNAME}
- DBUSER=${DBUSER} - DBUSER=${DBUSER}
@ -110,13 +100,11 @@ services:
restart: always restart: always
networks: networks:
mailcow-network: mailcow-network:
aliases:
- sogo
rmilter-mailcow: rmilter:
image: andryyy/mailcow-dockerized:rmilter image: andryyy/mailcow-dockerized:rmilter
depends_on: depends_on:
- pdns-mailcow - pdns
volumes: volumes:
- ./data/conf/rmilter/:/etc/rmilter.conf.d/:ro - ./data/conf/rmilter/:/etc/rmilter.conf.d/:ro
restart: always restart: always
@ -125,19 +113,17 @@ services:
dns_search: mailcow-network dns_search: mailcow-network
networks: networks:
mailcow-network: mailcow-network:
aliases:
- rmilter
dovecot-mailcow: dovecot:
image: andryyy/mailcow-dockerized:dovecot image: andryyy/mailcow-dockerized:dovecot
depends_on: depends_on:
- pdns-mailcow - pdns
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-mailcow - sogo
environment: environment:
- DBNAME=${DBNAME} - DBNAME=${DBNAME}
- DBUSER=${DBUSER} - DBUSER=${DBUSER}
@ -155,13 +141,11 @@ services:
hostname: ${MAILCOW_HOSTNAME} hostname: ${MAILCOW_HOSTNAME}
networks: networks:
mailcow-network: mailcow-network:
aliases:
- dovecot
postfix-mailcow: postfix:
image: andryyy/mailcow-dockerized:postfix image: andryyy/mailcow-dockerized:postfix
depends_on: depends_on:
- pdns-mailcow - pdns
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
@ -180,46 +164,43 @@ services:
dns_search: mailcow-network dns_search: mailcow-network
networks: networks:
mailcow-network: mailcow-network:
aliases:
- postfix
memcached-mailcow: memcached:
image: memcached image: memcached
depends_on: depends_on:
- pdns-mailcow - pdns
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-mailcow: nginx:
depends_on: depends_on:
- mysql-mailcow - mysql
- sogo-mailcow - sogo
- php-fpm-mailcow - phpfpm
- rspamd-mailcow - rspamd
image: nginx:mainline image: nginx:mainline
command: /bin/bash -c "envsubst < /etc/nginx/conf.d/listen.template > /etc/nginx/conf.d/listen.active && nginx -g 'daemon off;'"
environment:
- HTTPS_PORT=${HTTPS_PORT}
volumes_from: volumes_from:
- sogo-mailcow - sogo
volumes: volumes:
- ./data/web:/web:ro - ./data/web:/web:ro
- ./data/conf/rspamd/dynmaps:/dynmaps:ro - ./data/conf/rspamd/dynmaps:/dynmaps:ro
- ./data/assets/ssl/:/etc/ssl/mail/:ro - ./data/assets/ssl/:/etc/ssl/mail/:ro
- ./data/conf/nginx/:/etc/nginx/conf.d/:ro - ./data/conf/nginx/:/etc/nginx/conf.d/:rw
dns: dns:
- 172.22.1.254 - 172.22.1.254
dns_search: mailcow-network dns_search: mailcow-network
ports: ports:
- "443:443" - "${HTTPS_PORT}:${HTTPS_PORT}"
restart: always restart: always
networks: networks:
mailcow-network: mailcow-network:
aliases:
- nginx
networks: networks:
mailcow-network: mailcow-network:

View File

@ -39,6 +39,7 @@ DBROOT=$(</dev/urandom tr -dc A-Za-z0-9 | head -c 28)
# ------------------------------ # ------------------------------
# You should leave that alone # You should leave that alone
# Can also be 11.22.33.44:25 or 0.0.0.0:465 etc. for specific bindings # Can also be 11.22.33.44:25 or 0.0.0.0:465 etc. for specific bindings
HTTPS_PORT=443
SMTP_PORT=25 SMTP_PORT=25
SMTPS_PORT=465 SMTPS_PORT=465
SUBMISSION_PORT=587 SUBMISSION_PORT=587