From ab745072cd970226dc80ac8876f57b81ebe22d3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Bauer?= Date: Tue, 8 Jun 2021 17:08:48 +0200 Subject: [PATCH 1/7] update zammad to 4.1.0 (#214) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * update to 4.1.0 Signed-off-by: André Bauer --- .env | 2 +- Dockerfile | 2 +- containers/zammad-elasticsearch/Dockerfile | 2 +- containers/zammad-postgresql/Dockerfile | 2 +- containers/zammad/Dockerfile | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.env b/.env index 5095332..d3f6e1e 100644 --- a/.env +++ b/.env @@ -3,4 +3,4 @@ POSTGRES_PASS=zammad POSTGRES_USER=zammad RESTART=always # don't forget to add the minus before the version -VERSION=-4.0.0-25 +VERSION=-4.1.0 diff --git a/Dockerfile b/Dockerfile index ae96fd2..5dc93dc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,5 +8,5 @@ LABEL org.label-schema.build-date="$BUILD_DATE" \ org.label-schema.vcs-url="https://github.com/zammad/zammad" \ org.label-schema.vcs-type="Git" \ org.label-schema.vendor="Zammad" \ - org.label-schema.schema-version="4.0.0" \ + org.label-schema.schema-version="4.1.0" \ org.label-schema.docker.cmd="sysctl -w vm.max_map_count=262144;docker-compose up" diff --git a/containers/zammad-elasticsearch/Dockerfile b/containers/zammad-elasticsearch/Dockerfile index 79a2338..a9b48b2 100644 --- a/containers/zammad-elasticsearch/Dockerfile +++ b/containers/zammad-elasticsearch/Dockerfile @@ -9,7 +9,7 @@ LABEL org.label-schema.build-date="$BUILD_DATE" \ org.label-schema.vcs-url="https://github.com/zammad/zammad" \ org.label-schema.vcs-type="Git" \ org.label-schema.vendor="Zammad" \ - org.label-schema.schema-version="4.0.0" \ + org.label-schema.schema-version="4.1.0" \ org.label-schema.docker.cmd="sysctl -w vm.max_map_count=262144;docker-compose up" SHELL ["/bin/bash", "-e", "-o", "pipefail", "-c"] diff --git a/containers/zammad-postgresql/Dockerfile b/containers/zammad-postgresql/Dockerfile index 4051919..2041206 100644 --- a/containers/zammad-postgresql/Dockerfile +++ b/containers/zammad-postgresql/Dockerfile @@ -10,7 +10,7 @@ LABEL org.label-schema.build-date="$BUILD_DATE" \ org.label-schema.vcs-url="https://github.com/zammad/zammad" \ org.label-schema.vcs-type="Git" \ org.label-schema.vendor="Zammad" \ - org.label-schema.schema-version="4.0.0" \ + org.label-schema.schema-version="4.1.0" \ org.label-schema.docker.cmd="sysctl -w vm.max_map_count=262144;docker-compose up" SHELL ["/bin/bash", "-e", "-o", "pipefail", "-c"] diff --git a/containers/zammad/Dockerfile b/containers/zammad/Dockerfile index 634e3c4..0660c50 100644 --- a/containers/zammad/Dockerfile +++ b/containers/zammad/Dockerfile @@ -37,7 +37,7 @@ LABEL org.label-schema.build-date="$BUILD_DATE" \ org.label-schema.vcs-url="https://github.com/zammad/zammad" \ org.label-schema.vcs-type="Git" \ org.label-schema.vendor="Zammad" \ - org.label-schema.schema-version="4.0.0" \ + org.label-schema.schema-version="4.1.0" \ org.label-schema.docker.cmd="sysctl -w vm.max_map_count=262144;docker-compose up" ENV GIT_BRANCH stable From 0c4c6b8b59811992685599ef4fc8e78f816a8b6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Bauer?= Date: Wed, 9 Jun 2021 17:30:30 +0200 Subject: [PATCH 2/7] Update .env (#215) --- .env | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.env b/.env index d3f6e1e..12048e8 100644 --- a/.env +++ b/.env @@ -3,4 +3,4 @@ POSTGRES_PASS=zammad POSTGRES_USER=zammad RESTART=always # don't forget to add the minus before the version -VERSION=-4.1.0 +VERSION=-4.1.0-1 From fb9a9b20853eb425036c773eb132cb58d5eabbf2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Bauer?= Date: Mon, 14 Jun 2021 21:42:41 +0200 Subject: [PATCH 3/7] update to 4.1.0-6 --- .env | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.env b/.env index 12048e8..ad4a3d7 100644 --- a/.env +++ b/.env @@ -3,4 +3,4 @@ POSTGRES_PASS=zammad POSTGRES_USER=zammad RESTART=always # don't forget to add the minus before the version -VERSION=-4.1.0-1 +VERSION=-4.1.0-6 From 3866262aa5a8a2f4378078038ef68cb55321c362 Mon Sep 17 00:00:00 2001 From: Marcel Herrguth Date: Wed, 23 Jun 2021 18:04:19 +0200 Subject: [PATCH 4/7] Maintenance: Provide performance tuning options for docker-compose (#217) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Maintenance: Provide performance tuning options for docker-compose * Maintenance: Ensure PUMA_OPTS being available anytime * Maintenance: Move PUMA_OPTS position * Maintenance: Adjust puma startup command to allow cluster workers * Maintenance: Solve SC2086 * Maintenance: Ensure puma knows it's config * Fix Typo to load config file * Maintenance: Tell puma what its correct config is... * fix bind Signed-off-by: André Bauer * change concurency to 0 by default Signed-off-by: André Bauer Co-authored-by: André Bauer --- containers/zammad/docker-entrypoint.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/containers/zammad/docker-entrypoint.sh b/containers/zammad/docker-entrypoint.sh index 2c0e850..b104d4a 100755 --- a/containers/zammad/docker-entrypoint.sh +++ b/containers/zammad/docker-entrypoint.sh @@ -27,6 +27,7 @@ set -e : "${ZAMMAD_RAILSSERVER_PORT:=3000}" : "${ZAMMAD_WEBSOCKET_HOST:=zammad-websocket}" : "${ZAMMAD_WEBSOCKET_PORT:=6042}" +: "${ZAMMAD_WEB_CONCURRENCY:=0}" function check_zammad_ready { sleep 15 @@ -142,10 +143,10 @@ if [ "$1" = 'zammad-railsserver' ]; then cd "${ZAMMAD_DIR}" - echo "starting railsserver..." + echo "starting railsserver... with WEB_CONCURRENCY=${ZAMMAD_WEB_CONCURRENCY}" #shellcheck disable=SC2101 - exec bundle exec rails server puma -b [::] -p "${ZAMMAD_RAILSSERVER_PORT}" -e "${RAILS_ENV}" + exec bundle exec puma -b tcp://[::]:"${ZAMMAD_RAILSSERVER_PORT}" -w "${ZAMMAD_WEB_CONCURRENCY}" -e "${RAILS_ENV}" fi From a5ab85d6517e9d6c06d5889e36156e2ab70af290 Mon Sep 17 00:00:00 2001 From: Mantas Masalskis Date: Wed, 11 Aug 2021 15:52:57 +0300 Subject: [PATCH 5/7] Maintenance: Ruby updated to 2.6.8 (#227) --- containers/zammad/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/containers/zammad/Dockerfile b/containers/zammad/Dockerfile index 0660c50..ef28b61 100644 --- a/containers/zammad/Dockerfile +++ b/containers/zammad/Dockerfile @@ -1,4 +1,4 @@ -FROM ruby:2.6.6-slim AS builder +FROM ruby:2.6.8-slim AS builder # note: zammad is currently incompatible to alpine because of: # https://github.com/docker-library/ruby/issues/113 @@ -24,7 +24,7 @@ RUN chmod +x /tmp/setup.sh; \ /tmp/setup.sh builder -FROM ruby:2.6.6-slim +FROM ruby:2.6.8-slim ARG BUILD_DATE ARG DEBIAN_FRONTEND=noninteractive From be6cce84f0aed6508dca7a24e555ac759b11981e Mon Sep 17 00:00:00 2001 From: Martin Gruner Date: Fri, 13 Aug 2021 16:00:05 +0200 Subject: [PATCH 6/7] Maintenance: Provide a safer way to force a rebuild of the Elasticsearch volume data on upgrades. (#225) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: André Bauer --- README.md | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 2814831..2c7542b 100644 --- a/README.md +++ b/README.md @@ -23,10 +23,10 @@ This repo is meant to be the starting point for somebody who likes to use docker In environments with more then one web applications it is necessary to use a reverse proxy to route connections to port 80 and 443 to the right application. To run Zammad behind a revers proxy, we provide `docker-compose.proxy-example.yml` as a starting point. -1. Copy `./.examples/proxy/docker-compose.proxy-example.yml` to your own configuration, e.g. `./docker-compose.prod.yml` +1. Copy `./.examples/proxy/docker-compose.proxy-example.yml` to your own configuration, e.g. `./docker-compose.prod.yml` `cp ./.examples/proxy/docker-compose.proxy-example.yml ./docker-compose.prod.yml` 2. Modify the environment variable `VIRTUAL_HOST` and the name of the external network in `./docker-compose.prod.yml` to fit your environment. -3. Run docker-composer commands with the default and your configuration, e.g. `docker-compose -f docker-compose.yml -f docker-compose.prod.yml up -d` +3. Run docker-composer commands with the default and your configuration, e.g. `docker-compose -f docker-compose.yml -f docker-compose.prod.yml up -d` See `.examples/proxy/docker-compose.yml` for an example proxy project. @@ -50,14 +50,13 @@ Elasticsearch is enabled by default in the example `docker-compose.yml` file. It We've updated the Elasticsearch image from 5.6 to 7.6. As there is no direct upgrade path we have to delete all Elasticsearch indices and rebuild them. -Do the following to empty the ES docker volume: +This will depend on the name of your docker container and volume, which depends on the checkout directory (`zammad-docker-compose` by default): ```console docker-compose stop -set -o pipefail DOCKER_VOLUME="$(docker volume inspect zammaddockercompose_elasticsearch-data | grep Mountpoint | sed -e 's#.*": "##g' -e 's#",##')/*" -echo "${DOCKER_VOLUME}" #check this is a valid docker volume path! if not do not proceed or you might lose data! -rm -r $(docker volume inspect zammaddockercompose_elasticsearch-data | grep Mountpoint | sed -e 's#.*": "##g' -e 's#",##')/* -docker-compose start +docker container rm zammad-docker-compose_zammad-elasticsearch_1 +docker volume rm zammad-docker-compose_elasticsearch-data +docker-compose up --no-recreate ``` To workaround the [changes in the PostgreSQL 9.6 container](https://github.com/docker-library/postgres/commit/f1bc8782e7e57cc403d0b32c0e24599535859f76) do the following: From db7ca4b92d2cd3ee23d250c7dcbabbfd408dbf2f Mon Sep 17 00:00:00 2001 From: Martin Gruner Date: Mon, 16 Aug 2021 19:00:59 +0200 Subject: [PATCH 7/7] Fixes: 224 - Escape special characters in 'sed' replace pattern to support passwords with special characters. (#226) --- containers/zammad/docker-entrypoint.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/containers/zammad/docker-entrypoint.sh b/containers/zammad/docker-entrypoint.sh index b104d4a..619cbd1 100755 --- a/containers/zammad/docker-entrypoint.sh +++ b/containers/zammad/docker-entrypoint.sh @@ -54,7 +54,9 @@ if [ "$1" = 'zammad-init' ]; then cd "${ZAMMAD_DIR}" # configure database - sed -e "s#.*adapter:.*# adapter: postgresql#g" -e "s#.*database:.*# database: ${POSTGRESQL_DB}#g" -e "s#.*username:.*# username: ${POSTGRESQL_USER}#g" -e "s#.*password:.*# password: ${POSTGRESQL_PASS}\\n host: ${POSTGRESQL_HOST}\\n port: ${POSTGRESQL_PORT}#g" < contrib/packager.io/database.yml.pkgr > config/database.yml + # https://stackoverflow.com/questions/407523/escape-a-string-for-a-sed-replace-pattern + ESCAPED_POSTGRESQL_PASS=$(echo "$POSTGRESQL_PASS" | sed -e 's/[\/&]/\\&/g') + sed -e "s#.*adapter:.*# adapter: postgresql#g" -e "s#.*database:.*# database: ${POSTGRESQL_DB}#g" -e "s#.*username:.*# username: ${POSTGRESQL_USER}#g" -e "s#.*password:.*# password: ${ESCAPED_POSTGRESQL_PASS}\\n host: ${POSTGRESQL_HOST}\\n port: ${POSTGRESQL_PORT}#g" < contrib/packager.io/database.yml.pkgr > config/database.yml # configure memcache sed -i -e "s/.*config.cache_store.*file_store.*cache_file_store.*/ config.cache_store = :dalli_store, '${MEMCACHED_HOST}:${MEMCACHED_PORT}'\\n config.session_store = :dalli_store, '${MEMCACHED_HOST}:${MEMCACHED_PORT}'/" config/application.rb