From ebf96981a8f0c75e5f51407258f2f756775b8f57 Mon Sep 17 00:00:00 2001 From: Andreas Balogh Date: Mon, 24 Jan 2022 21:06:11 +0000 Subject: [PATCH] streamlined deploy --- build.sh | 1 - deploy-kopano.sh | 16 ++++++++++------ kopano.dockerfile | 4 +--- run.sh | 4 ++++ 4 files changed, 15 insertions(+), 10 deletions(-) create mode 100644 run.sh diff --git a/build.sh b/build.sh index 7704ea7..dd76eb3 100644 --- a/build.sh +++ b/build.sh @@ -1,3 +1,2 @@ #!/usr/bin/bash docker build -f kopano.dockerfile -t kopano:1 . -# docker run -it kopano:1 bash \ No newline at end of file diff --git a/deploy-kopano.sh b/deploy-kopano.sh index 5d6875d..6d09b1a 100644 --- a/deploy-kopano.sh +++ b/deploy-kopano.sh @@ -1,8 +1,12 @@ +apt-get update -y +DEBIAN_FRONTEND=noninteractive +TZ=Europe/Berlin +apt-get install -y tzdata z-push apache2 tar xzf core-11.0.2.50.507cbae-Ubuntu_20.04-amd64.tar.gz tar xzf webapp-6.0.0.57.1049268-Ubuntu_20.04-all.tar.gz -cd ~/xzf core-11.0.2.50.507cbae-Ubuntu_20.04-amd64 -for F in *.deb; do dpkg --unpack --no-triggers $F; done -cd ~/webapp-6.0.0.57.1049268-Ubuntu_20.04-all -for F in *.deb; do dpkg --unpack --no-triggers $F; done -apt install -f -y -apt install z-push -y +for F in ~/core-11.0.2.50.507cbae-Ubuntu_20.04-amd64/*.deb; do dpkg --unpack --no-triggers $F; done +for F in ~/webapp-6.0.0.57.1049268-Ubuntu_20.04-all/*.deb; do dpkg --unpack --no-triggers $F; done +apt-get install -f -y +# cleanup install +apt-get clean +rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* ~/.cache ~/.npm diff --git a/kopano.dockerfile b/kopano.dockerfile index 0cc8bd6..84454cb 100644 --- a/kopano.dockerfile +++ b/kopano.dockerfile @@ -7,15 +7,13 @@ EXPOSE 2003 EXPOSE 993 EXPOSE 8443 # build section -RUN apt update -y -RUN DEBIAN_FRONTEND=noninteractive TZ=Europe/Berlin apt-get install -y tzdata # kopano WORKDIR /root -COPY ./etc /etc COPY dist/core-11.0.2.50.507cbae-Ubuntu_20.04-amd64.tar.gz . COPY dist/webapp-6.0.0.57.1049268-Ubuntu_20.04-all.tar.gz . COPY deploy-kopano.sh . RUN ./deploy-kopano.sh +COPY service /etc/service # https://documentation.kopano.io/kopanocore_administrator_manual/configure_kc_components.html#configure-kopano-dagent-for-delivery-via-unix-socket # create run scripts in etc/service # CMD ["/usr/sbin/kopano-server", "-F", "-c", "/etc/kopano/server.cfg"] diff --git a/run.sh b/run.sh new file mode 100644 index 0000000..8474f73 --- /dev/null +++ b/run.sh @@ -0,0 +1,4 @@ +#!/usr/bin/bash +docker run -d \ + -p 80:80 \ + kopano:1 \ No newline at end of file