diff --git a/README.md b/README.md index 51727a705c22b4dbdc51b83155a62a0927d30cf1..7e841a91da9cd529db790cc756acc2845991708b 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,12 @@ Dockerized setup of the [SOGo](https://sogo.nu/) groupware. +This a WIP and not ready or in use anywhere. I'm playing around with this +because the mail UI in Nextcloud is poor (for example search times out for me) +and the ActiveSync using z-push fails more than it succeeds. I'm thinking about +replacing the mail UI, calendar, contact, tasks and ActiveSync (the PIM aspects) +with SOGo and removing z-push. + ## License This software is licensed under the MIT license (see `LICENSE.txt`). diff --git a/crond/.dockerignore b/crond/.dockerignore new file mode 100644 index 0000000000000000000000000000000000000000..780ece0ba38bebbc9981d893ff31ffc6cb6815e2 --- /dev/null +++ b/crond/.dockerignore @@ -0,0 +1,2 @@ +* +!crontab diff --git a/crond/Dockerfile b/crond/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..e554c466f43c519595c0be6d3fe4437d501c0749 --- /dev/null +++ b/crond/Dockerfile @@ -0,0 +1,7 @@ +# hadolint ignore=DL3006 +FROM registry.hub.docker.com/adarnimrod/cron +# hadolint ignore=DL3018 +RUN apk add --no-cache --update docker-cli +COPY --chown=root:root crontab /crontab +# hadolint ignore=DL3002 +USER root diff --git a/crond/crontab b/crond/crontab new file mode 100644 index 0000000000000000000000000000000000000000..a356d6f7b7aff827d7765b114fa80815f45bfe1c --- /dev/null +++ b/crond/crontab @@ -0,0 +1,2 @@ +*/5 * * * * docker exec -u sogo sogo_sogo_1 /usr/sbin/sogo-ealarms-notify +0 0 * * * docker exec -u sogo sogo_sogo_1 /usr/sbin/sogo-tool update-autoreply -p /etc/sogo/sieve.creds diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..5c9e60c6ee039f6665929f0a5c3ff01625f901dd --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,51 @@ +--- +version: "3.7" +services: + crond: + build: + context: crond/ + restart: always + volumes: + - /run/docker.sock:/run/docker.sock + + memcached: + image: registry.hub.docker.com/library/memcached:1.6-alpine + healthcheck: + test: + - CMD-SHELL + - pgrep memcached || exit 1 + restart: always + + postres: + environment: + POSTGRES_PASSWORD: "${POSTGRES_PASSWORD:-foo}" + POSTGRES_USER: sogo + image: registry.hub.docker.com/library/postgres:13-alpine + healthcheck: + test: + - CMD-SHELL + - >- + PGPASSWORD="$${POSTGRES_PASSWORD}" + psql + --host=127.0.0.1 + --username=$${POSTGRES_USER} + --dbname=$${POSTGRES_USER} + --command="SELECT 1;" + || exit 1 + restart: always + volumes: + - postgres:/var/lib/postgresql/data + + sogo: + build: + context: sogo/ + hostname: sogo.shore.co.il + restart: always + +volumes: + postgres: + +networks: + default: + name: shore + external: true diff --git a/sogo/.dockerignore b/sogo/.dockerignore new file mode 100644 index 0000000000000000000000000000000000000000..72e8ffc0db8aad71a934dd11e5968bd5109e54b4 --- /dev/null +++ b/sogo/.dockerignore @@ -0,0 +1 @@ +* diff --git a/sogo/Dockerfile b/sogo/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..e8b6852e660a7f4235290abd2ad43f653def482f --- /dev/null +++ b/sogo/Dockerfile @@ -0,0 +1,21 @@ +FROM registry.hub.docker.com/library/debian:buster-slim +# hadolint ignore=DL3008 +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + apt-transport-https \ + ca-certificates \ + gnupg \ + && \ + apt-key adv --keyserver hkp://keys.gnupg.net --recv-key 0x810273C4 && \ + echo 'deb https://packages.inverse.ca/SOGo/nightly/5/debian/ buster buster' > /etc/apt/sources.list.d/sogo.list && \ + apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + sogo-activesync \ + sogo \ + && \ + rm -rf /tmp/* /var/tmp/* /var/lib/apt/lists/* /var/cache/apt/archives/* +EXPOSE 20000 +USER "www-data" +WORKDIR /var/www +CMD [ "apache2", "-DFOREGROUND" ] +HEALTHCHECK CMD wget --spider --quiet http://localhost:20000/ --user-agent 'Healthcheck' || exit 1