update recovered sdlc git repo

This commit is contained in:
andreas
2024-02-11 11:54:51 +00:00
parent f808ebae4a
commit 6b2eb41193
82 changed files with 3903 additions and 53 deletions

View File

@@ -17,7 +17,7 @@ rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* ~/.cache ~/.npm
rm -rf core-11.0.2.50.507cbae-Ubuntu_20.04-amd64
EOF
# use envsubst in entrypoint script to convert config templates to actual config files
COPY --chmod=0775 entrypoint.sh /entrypoint.sh
COPY --chmod=0775 core/entrypoint.sh /entrypoint.sh
# https://documentation.kopano.io/kopanocore_administrator_manual/configure_kc_components.html#configure-kopano-dagent-for-delivery-via-unix-socket
# mapi (client-server)
#EXPOSE 236
@@ -25,6 +25,23 @@ COPY --chmod=0775 entrypoint.sh /entrypoint.sh
#EXPOSE 237
# lmtp (dagent)
#EXPOSE 2003
COPY etc-template /root/etc/
RUN << EOF
cp -p /etc/kopano/server.cfg /etc/kopano/server.cfg-dist
sed -i \
-e's/server_listen = \*\%lo:236/server_listen = 0.0.0.0:236/' \
-e's|#server_ssl_key_file = /etc/kopano/ssl/server.pem|server_ssl_key_file = /etc/kopano/ssl/private/server-key-cert.pem|' \
-e's|#server_ssl_ca_file = /etc/kopano/ssl/cacert.pem|server_ssl_ca_file = /etc/kopano/ssl/certs/balusign-ca-chain.pem|' \
-e's|#server_ssl_ca_path = /etc/kopano/ssl/certs|server_ssl_ca_path = /etc/kopano/ssl/certs|' \
-e's|#sslkeys_path = /etc/kopano/sslkeys|sslkeys_path = /etc/kopano/sslkeys|' \
-e's|#server_name =|server_name = zntrl.de|' \
-e's|#database_engine = mysql|database_engine = mysql|' \
-e's|#mysql_host = localhost|mysql_host = mysql|' \
-e's|#mysql_user = root|mysql_user = kopano|' \
-e's|#mysql_password =|mysql_password = $MYSQL_PASSWD|' \
-e's|#mysql_database = kopano|mysql_database = kopano|' \
/etc/kopano/server.cfg
EOF
VOLUME /var/lib/kopano/attachments
VOLUME /var/lib/kopano/search
ENTRYPOINT ["/entrypoint.sh"]

View File

@@ -2,4 +2,11 @@
set -e
chown kopano:kopano /var/lib/kopano/attachments
# runas user kopano
env
cp -rp /root/etc/kopano/* /etc/kopano
for $F in $(find /root/etc/kopano -name '*.cfg' -type f)
do
envsubst <$F >/etc/kopano/${F##*/}
diff $F /etc/kopano/${F##*/}
done
exec "$@"

View File

@@ -1,8 +1,8 @@
#!/usr/bin/bash
# export DOCKER_BUILDKIT=1
docker run -d --rm --name dist -p80:80 -v/root/kopano-docker/dist:/usr/local/apache2/htdocs httpd
docker build --no-cache --progress=plain -t core .
docker build -t core .
docker build --no-cache --progress=plain -t core -f core/Dockerfile .
docker build -t core -f core/Dockerfile .
docker run --rm -it --name core -p8081:80 core bash
docker logs -f core
docker exec -it core bash