create composer
This commit is contained in:
+2
-2
@@ -1,2 +1,2 @@
|
|||||||
main.cvd
|
/ireddocker/main.cvd
|
||||||
iredmail-env.conf
|
/ireddocker/iredmail-env.conf
|
||||||
|
|||||||
@@ -0,0 +1,48 @@
|
|||||||
|
version: '3'
|
||||||
|
|
||||||
|
# TODO
|
||||||
|
# - add `depends_on:`
|
||||||
|
# - add top-level `volumes:`
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
mariadb:
|
||||||
|
mail_dir:
|
||||||
|
cert_dir:
|
||||||
|
|
||||||
|
services:
|
||||||
|
master_mariadb:
|
||||||
|
image: mariadb:latest
|
||||||
|
container_name: master_mariadb
|
||||||
|
environment:
|
||||||
|
MYSQL_ROOT_PASSWORD: "123qweASD"
|
||||||
|
ports:
|
||||||
|
- "3306:3306"
|
||||||
|
volumes:
|
||||||
|
- mariadb:/etc/mysql/conf.d/
|
||||||
|
|
||||||
|
|
||||||
|
ireddocker:
|
||||||
|
build:
|
||||||
|
dockerfile: ireddocker/Dockerfile
|
||||||
|
context: ireddocker/
|
||||||
|
image: ireddocker:0.1
|
||||||
|
container_name: iredmail-mail
|
||||||
|
hostname: mail.recsds.spbsut.ru
|
||||||
|
env_file:
|
||||||
|
- ireddocker/iredmail-env.conf
|
||||||
|
ports:
|
||||||
|
- "110:110"
|
||||||
|
- "995:995"
|
||||||
|
- "143:143"
|
||||||
|
- "993:993"
|
||||||
|
- "443:443"
|
||||||
|
- "80:80"
|
||||||
|
- "25:25"
|
||||||
|
- "587:587"
|
||||||
|
- "465:465"
|
||||||
|
volumes:
|
||||||
|
- cert_dir:/opt/iredmail/ssl
|
||||||
|
- mail_dir:/var/vmail/vmail1
|
||||||
|
depends_on:
|
||||||
|
- master_mariadb
|
||||||
|
|
||||||
@@ -1,19 +1,19 @@
|
|||||||
FROM ubuntu:bionic
|
FROM ubuntu:bionic
|
||||||
MAINTAINER Artem Shvidkiy <shvidkiy@sut.ru>
|
MAINTAINER Artem Shvidkiy <shvidkiy@sut.ru>
|
||||||
RUN apt-get update
|
RUN apt-get update
|
||||||
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y vim apt-utils postfix postfix-pcre libsasl2-modules ldap-utils postfix-ldap \
|
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y vim apt-utils postfix postfix-pcre libsasl2-modules \
|
||||||
libnet-ldap-perl libdbd-mysql-perl mariadb-server mariadb-client php-cli php-fpm php-json php-gd php-curl mcrypt \
|
ldap-utils postfix-ldap libnet-ldap-perl libdbd-mysql-perl mariadb-server mariadb-client php-cli \
|
||||||
php-intl php-xml php-mbstring php-ldap php-mysql nginx-full dovecot-imapd dovecot-pop3d dovecot-lmtpd \
|
php-fpm php-json php-gd php-curl mcrypt php-intl php-xml php-mbstring php-ldap php-mysql \
|
||||||
dovecot-managesieved dovecot-sieve dovecot-ldap dovecot-mysql amavisd-new libcrypt-openssl-rsa-perl \
|
nginx-full dovecot-imapd dovecot-pop3d dovecot-lmtpd dovecot-managesieved dovecot-sieve \
|
||||||
|
dovecot-ldap dovecot-mysql amavisd-new libcrypt-openssl-rsa-perl \
|
||||||
libmail-dkim-perl clamav-freshclam clamav-daemon spamassassin altermime arj nomarch cpio lzop cabextract \
|
libmail-dkim-perl clamav-freshclam clamav-daemon spamassassin altermime arj nomarch cpio lzop cabextract \
|
||||||
p7zip-full rpm libmail-spf-perl unrar-free pax lrzip libclamunrar7 mlmmj python3-setuptools python3-pip \
|
p7zip-full rpm libmail-spf-perl unrar-free pax lrzip libclamunrar7 mlmmj python3-setuptools python3-pip \
|
||||||
python3-wheel python3-requests uwsgi uwsgi-plugin-python3 python3-ldap python3-pymysql php-net-ldap3 \
|
python3-wheel python3-requests uwsgi uwsgi-plugin-python3 python3-ldap python3-pymysql php-net-ldap3 \
|
||||||
python3-sqlalchemy python3-dnspython python3-requests python3-pip python3-ldap python3-pymysql python-jinja2 \
|
python3-sqlalchemy python3-dnspython python3-requests python3-pip python3-ldap python3-pymysql python-jinja2 \
|
||||||
python-netifaces python-pycurl python-bcrypt python-dnspython python-webpy python-mysqldb \
|
python-netifaces python-pycurl python-bcrypt python-dnspython python-webpy python-mysqldb syslog-ng \
|
||||||
python-requests uwsgi uwsgi-plugin-python python-ldap python-mysqldb python-pymysql bzip2 acl patch cron \
|
python-requests uwsgi uwsgi-plugin-python python-ldap python-mysqldb python-pymysql bzip2 acl patch cron \
|
||||||
tofrodos logwatch unzip bsdutils liblz4-tool distro-info-data iso-codes libapt-inst2.0 lsb-release powermgmt-base \
|
tofrodos logwatch unzip bsdutils liblz4-tool distro-info-data iso-codes libapt-inst2.0 lsb-release powermgmt-base \
|
||||||
python-apt-common python3-apt python3-software-properties software-properties-common unattended-upgrades wget dialog libodbc1 slapd
|
python-apt-common python3-apt python3-software-properties software-properties-common unattended-upgrades wget dialog libodbc1 slapd
|
||||||
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y syslog-ng
|
|
||||||
ADD main.cvd /var/lib/clamav/main.cvd
|
ADD main.cvd /var/lib/clamav/main.cvd
|
||||||
RUN pip3 install web.py>=0.51 six>=1.15.0
|
RUN pip3 install web.py>=0.51 six>=1.15.0
|
||||||
ADD init-functions /lib/lsb/init-functions
|
ADD init-functions /lib/lsb/init-functions
|
||||||
@@ -306,7 +306,38 @@ EOF
|
|||||||
|
|
||||||
touch /.configured
|
touch /.configured
|
||||||
|
|
||||||
|
|
||||||
|
/usr/sbin/syslog-ng -F --no-caps &
|
||||||
|
|
||||||
|
|
||||||
|
if [[ X"${MYSQLEXIST}" != X'YES' || X"${MYSQLEXIST}" != X'yes' ]]; then
|
||||||
|
service mysql restart
|
||||||
|
fi
|
||||||
|
|
||||||
|
service dovecot restart
|
||||||
|
service nginx restart
|
||||||
|
service php7.2-fpm restart
|
||||||
|
service postfix restart
|
||||||
|
service clamav-daemon restart
|
||||||
|
service clamav-freshclam restart
|
||||||
|
service spamassasin restart
|
||||||
|
service amavis restart
|
||||||
|
service mlmmjadmin_enable restart
|
||||||
|
service uwsgi restart
|
||||||
|
|
||||||
|
if [[ X"${LDAP_EXTERNAL_USE}" != X'YES' || X"${LDAP_EXTERNAL_USE}" != X'yes' ]]; then
|
||||||
|
service slapd restart
|
||||||
|
service iredapd restart
|
||||||
|
fi
|
||||||
|
|
||||||
|
while true; do sleep 1; done
|
||||||
|
|
||||||
else
|
else
|
||||||
|
#does not start, if mysql stopped
|
||||||
|
|
||||||
|
while ! mysqladmin ping -h"${MYSQL_SERVER_ADDRESS}" --silent; do
|
||||||
|
sleep 1
|
||||||
|
done
|
||||||
|
|
||||||
# Start syslog-ng
|
# Start syslog-ng
|
||||||
|
|
||||||
@@ -336,5 +367,8 @@ else
|
|||||||
service iredapd start
|
service iredapd start
|
||||||
fi
|
fi
|
||||||
|
|
||||||
while true; do sleep 1; done
|
while mysqladmin ping -h"${MYSQL_SERVER_ADDRESS}" --silent; do
|
||||||
|
sleep 1
|
||||||
|
done
|
||||||
|
|
||||||
fi
|
fi
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user