(simatec) Beta 0.1.0
This commit is contained in:
parent
dd09583814
commit
1f87890f4f
2 changed files with 49 additions and 20 deletions
14
README.md
14
README.md
|
@ -15,6 +15,8 @@ https://www.mailpiler.org/
|
||||||
|
|
||||||
* Install Docker
|
* Install Docker
|
||||||
|
|
||||||
|
`apt install curl git -y`
|
||||||
|
|
||||||
`curl -sSL https://get.docker.com/ | CHANNEL=stable sh`
|
`curl -sSL https://get.docker.com/ | CHANNEL=stable sh`
|
||||||
|
|
||||||
`systemctl enable --now docker`
|
`systemctl enable --now docker`
|
||||||
|
@ -31,13 +33,15 @@ https://www.mailpiler.org/
|
||||||
|
|
||||||
* remove postfix
|
* remove postfix
|
||||||
|
|
||||||
`apt purge postfix`
|
`apt purge postfix -y`
|
||||||
|
|
||||||
* Clone repository
|
* Clone repository
|
||||||
|
|
||||||
`cd /opt
|
`cd /opt`
|
||||||
clone https://github.com/simatec/piler-docker.git
|
|
||||||
cd /opt/piler-docker`
|
`git clone https://github.com/simatec/piler-docker.git`
|
||||||
|
|
||||||
|
`cd /opt/piler-docker`
|
||||||
|
|
||||||
configure your Piler seetings
|
configure your Piler seetings
|
||||||
|
|
||||||
|
@ -45,7 +49,7 @@ configure your Piler seetings
|
||||||
|
|
||||||
after config start the Install
|
after config start the Install
|
||||||
|
|
||||||
`./install-piler.sh`
|
`bash install-piler.sh`
|
||||||
|
|
||||||
Congratulations your Piler is installed...
|
Congratulations your Piler is installed...
|
||||||
|
|
||||||
|
|
|
@ -3,22 +3,34 @@
|
||||||
. ./piler.conf
|
. ./piler.conf
|
||||||
ln -s ./piler.conf .env
|
ln -s ./piler.conf .env
|
||||||
|
|
||||||
# docker stop
|
# docker start
|
||||||
|
echo
|
||||||
|
echo "==================================="
|
||||||
echo "start docker-compose for Piler"
|
echo "start docker-compose for Piler"
|
||||||
|
echo "==================================="
|
||||||
|
echo
|
||||||
|
|
||||||
cd /opt/piler
|
cd /opt/piler-docker
|
||||||
docker-compose up -d
|
docker-compose up -d
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo "==================================="
|
||||||
echo "backup the File config-site.php"
|
echo "backup the File config-site.php"
|
||||||
cp /var/lib/docker/volumes/piler_piler_etc/_data/config-site.php /var/lib/docker/volumes/piler_piler_etc/_data/config-site.php.bak
|
echo "==================================="
|
||||||
|
echo
|
||||||
|
|
||||||
|
cp /var/lib/docker/volumes/piler-docker_piler_etc/_data/config-site.php /var/lib/docker/volumes/piler-docker_piler_etc/_data/config-site.php.bak
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo "==================================="
|
||||||
echo "set User settings ..."
|
echo "set User settings ..."
|
||||||
|
echo "==================================="
|
||||||
cat >> /var/lib/docker/volumes/piler_piler_etc/_data/config-site.php <<EOF
|
echo
|
||||||
|
cat >> /var/lib/docker/volumes/piler-docker_piler_etc/_data/config-site.php <<EOF
|
||||||
|
|
||||||
// Smarthost
|
// Smarthost
|
||||||
$config['SMARTHOST'] = '$SMARTHOST';
|
\$config['SMARTHOST'] = '$SMARTHOST';
|
||||||
$config['SMARTHOST_PORT'] = '25';
|
\$config['SMARTHOST_PORT'] = '25';
|
||||||
|
|
||||||
// CUSTOM
|
// CUSTOM
|
||||||
\$config['PROVIDED_BY'] = '$PILER_DOMAIN';
|
\$config['PROVIDED_BY'] = '$PILER_DOMAIN';
|
||||||
|
@ -73,26 +85,39 @@ EOF
|
||||||
|
|
||||||
if [ "$USE_MAILCOW" = true ] ; then
|
if [ "$USE_MAILCOW" = true ] ; then
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo "==================================="
|
||||||
echo "set Mailcow Api-Key config"
|
echo "set Mailcow Api-Key config"
|
||||||
|
echo "==================================="
|
||||||
|
echo
|
||||||
|
|
||||||
cat >> /var/lib/docker/volumes/piler_piler_etc/_data/config-site.php <<EOF
|
cat >> /var/lib/docker/volumes/piler-docker_piler_etc/_data/config-site.php <<EOF
|
||||||
|
|
||||||
// Mailcow API
|
// Mailcow API
|
||||||
$config['MAILCOW_API_KEY'] = '$MAILCOW_APIKEY';
|
\$config['MAILCOW_API_KEY'] = '$MAILCOW_APIKEY';
|
||||||
$config['MAILCOW_SET_REALNAME'] = true;
|
\$config['MAILCOW_SET_REALNAME'] = true;
|
||||||
$config['CUSTOM_EMAIL_QUERY_FUNCTION'] = 'query_mailcow_for_email_access';
|
\$config['CUSTOM_EMAIL_QUERY_FUNCTION'] = 'query_mailcow_for_email_access';
|
||||||
$config['MAILCOW_HOST'] = '$MAILCOW_HOST'; // default $config['IMAP_HOST']
|
\$config['MAILCOW_HOST'] = '$MAILCOW_HOST'; // default $config['IMAP_HOST']
|
||||||
include('auth-mailcow.php');
|
include('auth-mailcow.php');
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
curl -o /var/lib/docker/volumes/piler_piler_etc/_data/auth-mailcow.php https://raw.githubusercontent.com/patschi/mailpiler-mailcow-integration/master/auth-mailcow.php
|
curl -o /var/lib/docker/volumes/piler-docker_piler_etc/_data/auth-mailcow.php https://raw.githubusercontent.com/patschi/mailpiler-mailcow-integration/master/auth-mailcow.php
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# docker start
|
# docker start
|
||||||
|
echo
|
||||||
|
echo "==================================="
|
||||||
echo "restart docker-compose ..."
|
echo "restart docker-compose ..."
|
||||||
|
echo "==================================="
|
||||||
|
echo
|
||||||
|
|
||||||
cd /opt/piler
|
cd /opt/piler-docker
|
||||||
docker-compose restart
|
docker-compose restart
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo "======================================================================="
|
||||||
echo "Piler install completed successfully"
|
echo "Piler install completed successfully"
|
||||||
echo "you can start in your Browser with http://${PILER_DOMAIN}!"
|
echo
|
||||||
|
echo "you can start in your Browser with http://${PILER_DOMAIN}:8080!"
|
||||||
|
echo "======================================================================="
|
||||||
|
echo
|
||||||
|
|
Loading…
Reference in a new issue