Merge remote-tracking branch 'upstream/master' into colpari-master
This commit is contained in:
		
						commit
						98a2e4b853
					
				
							
								
								
									
										2
									
								
								.env
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								.env
									
									
									
									
									
								
							@ -3,4 +3,4 @@ POSTGRES_PASS=zammad
 | 
				
			|||||||
POSTGRES_USER=zammad
 | 
					POSTGRES_USER=zammad
 | 
				
			||||||
RESTART=always
 | 
					RESTART=always
 | 
				
			||||||
# don't forget to add the minus before the version
 | 
					# don't forget to add the minus before the version
 | 
				
			||||||
VERSION=-4.0.0-25c
 | 
					VERSION=-4.1.0-6c
 | 
				
			||||||
 | 
				
			|||||||
@ -8,5 +8,5 @@ LABEL org.label-schema.build-date="$BUILD_DATE" \
 | 
				
			|||||||
      org.label-schema.vcs-url="https://github.com/colpari/zammad" \
 | 
					      org.label-schema.vcs-url="https://github.com/colpari/zammad" \
 | 
				
			||||||
      org.label-schema.vcs-type="Git" \
 | 
					      org.label-schema.vcs-type="Git" \
 | 
				
			||||||
      org.label-schema.vendor="colpari" \
 | 
					      org.label-schema.vendor="colpari" \
 | 
				
			||||||
      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"
 | 
					      org.label-schema.docker.cmd="sysctl -w vm.max_map_count=262144;docker-compose up"
 | 
				
			||||||
 | 
				
			|||||||
@ -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.
 | 
					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.
 | 
					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
 | 
					```console
 | 
				
			||||||
docker-compose stop
 | 
					docker-compose stop
 | 
				
			||||||
set -o pipefail DOCKER_VOLUME="$(docker volume inspect zammaddockercompose_elasticsearch-data | grep Mountpoint | sed -e 's#.*": "##g' -e 's#",##')/*"
 | 
					docker container rm zammad-docker-compose_zammad-elasticsearch_1
 | 
				
			||||||
echo "${DOCKER_VOLUME}" #check this is a valid docker volume path! if not do not proceed or you might lose data!
 | 
					docker volume rm zammad-docker-compose_elasticsearch-data
 | 
				
			||||||
rm -r $(docker volume inspect zammaddockercompose_elasticsearch-data | grep Mountpoint | sed -e 's#.*": "##g' -e 's#",##')/*
 | 
					docker-compose up --no-recreate
 | 
				
			||||||
docker-compose start
 | 
					 | 
				
			||||||
```
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
To workaround the [changes in the PostgreSQL 9.6 container](https://github.com/docker-library/postgres/commit/f1bc8782e7e57cc403d0b32c0e24599535859f76) do the following:
 | 
					To workaround the [changes in the PostgreSQL 9.6 container](https://github.com/docker-library/postgres/commit/f1bc8782e7e57cc403d0b32c0e24599535859f76) do the following:
 | 
				
			||||||
 | 
				
			|||||||
@ -9,7 +9,7 @@ LABEL org.label-schema.build-date="$BUILD_DATE" \
 | 
				
			|||||||
      org.label-schema.vcs-url="https://github.com/colpari/zammad" \
 | 
					      org.label-schema.vcs-url="https://github.com/colpari/zammad" \
 | 
				
			||||||
      org.label-schema.vcs-type="Git" \
 | 
					      org.label-schema.vcs-type="Git" \
 | 
				
			||||||
      org.label-schema.vendor="colpari" \
 | 
					      org.label-schema.vendor="colpari" \
 | 
				
			||||||
      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"
 | 
					      org.label-schema.docker.cmd="sysctl -w vm.max_map_count=262144;docker-compose up"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
SHELL ["/bin/bash", "-e", "-o", "pipefail", "-c"]
 | 
					SHELL ["/bin/bash", "-e", "-o", "pipefail", "-c"]
 | 
				
			||||||
 | 
				
			|||||||
@ -10,7 +10,7 @@ LABEL org.label-schema.build-date="$BUILD_DATE" \
 | 
				
			|||||||
      org.label-schema.vcs-url="https://github.com/colpari/zammad" \
 | 
					      org.label-schema.vcs-url="https://github.com/colpari/zammad" \
 | 
				
			||||||
      org.label-schema.vcs-type="Git" \
 | 
					      org.label-schema.vcs-type="Git" \
 | 
				
			||||||
      org.label-schema.vendor="colpari" \
 | 
					      org.label-schema.vendor="colpari" \
 | 
				
			||||||
      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"
 | 
					      org.label-schema.docker.cmd="sysctl -w vm.max_map_count=262144;docker-compose up"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
SHELL ["/bin/bash", "-e", "-o", "pipefail", "-c"]
 | 
					SHELL ["/bin/bash", "-e", "-o", "pipefail", "-c"]
 | 
				
			||||||
 | 
				
			|||||||
@ -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:
 | 
					# note: zammad is currently incompatible to alpine because of:
 | 
				
			||||||
# https://github.com/docker-library/ruby/issues/113
 | 
					# https://github.com/docker-library/ruby/issues/113
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -24,7 +24,7 @@ RUN chmod +x /tmp/setup.sh; \
 | 
				
			|||||||
    /tmp/setup.sh builder
 | 
					    /tmp/setup.sh builder
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
FROM ruby:2.6.6-slim
 | 
					FROM ruby:2.6.8-slim
 | 
				
			||||||
 | 
					
 | 
				
			||||||
ARG BUILD_DATE
 | 
					ARG BUILD_DATE
 | 
				
			||||||
ARG DEBIAN_FRONTEND=noninteractive
 | 
					ARG DEBIAN_FRONTEND=noninteractive
 | 
				
			||||||
@ -37,7 +37,7 @@ LABEL org.label-schema.build-date="$BUILD_DATE" \
 | 
				
			|||||||
      org.label-schema.vcs-url="https://github.com/colpari/zammad" \
 | 
					      org.label-schema.vcs-url="https://github.com/colpari/zammad" \
 | 
				
			||||||
      org.label-schema.vcs-type="Git" \
 | 
					      org.label-schema.vcs-type="Git" \
 | 
				
			||||||
      org.label-schema.vendor="colpari" \
 | 
					      org.label-schema.vendor="colpari" \
 | 
				
			||||||
      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"
 | 
					      org.label-schema.docker.cmd="sysctl -w vm.max_map_count=262144;docker-compose up"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
ENV GIT_BRANCH colpari-develop
 | 
					ENV GIT_BRANCH colpari-develop
 | 
				
			||||||
 | 
				
			|||||||
@ -27,6 +27,7 @@ set -e
 | 
				
			|||||||
: "${ZAMMAD_RAILSSERVER_PORT:=3000}"
 | 
					: "${ZAMMAD_RAILSSERVER_PORT:=3000}"
 | 
				
			||||||
: "${ZAMMAD_WEBSOCKET_HOST:=zammad-websocket}"
 | 
					: "${ZAMMAD_WEBSOCKET_HOST:=zammad-websocket}"
 | 
				
			||||||
: "${ZAMMAD_WEBSOCKET_PORT:=6042}"
 | 
					: "${ZAMMAD_WEBSOCKET_PORT:=6042}"
 | 
				
			||||||
 | 
					: "${ZAMMAD_WEB_CONCURRENCY:=0}"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
function check_zammad_ready {
 | 
					function check_zammad_ready {
 | 
				
			||||||
  sleep 15
 | 
					  sleep 15
 | 
				
			||||||
@ -53,7 +54,9 @@ if [ "$1" = 'zammad-init' ]; then
 | 
				
			|||||||
  cd "${ZAMMAD_DIR}"
 | 
					  cd "${ZAMMAD_DIR}"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  # configure database
 | 
					  # 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
 | 
					  # 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
 | 
					  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
 | 
				
			||||||
@ -142,10 +145,10 @@ if [ "$1" = 'zammad-railsserver' ]; then
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
  cd "${ZAMMAD_DIR}"
 | 
					  cd "${ZAMMAD_DIR}"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  echo "starting railsserver..."
 | 
					  echo "starting railsserver... with WEB_CONCURRENCY=${ZAMMAD_WEB_CONCURRENCY}"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  #shellcheck disable=SC2101
 | 
					  #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
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user