diff --git a/.env b/.env index 0af8aac..e05dd84 100644 --- a/.env +++ b/.env @@ -1,4 +1,4 @@ # don't forget to add the minus before the version # example: VERSION=-2.1.0-13 -IMAGE_REPO=monotek/zammad-docker-compose +IMAGE_REPO=zammad/zammad-docker-compose VERSION= diff --git a/containers/zammad-postgresql/Dockerfile b/containers/zammad-postgresql/Dockerfile index 3a6641e..6a364c0 100644 --- a/containers/zammad-postgresql/Dockerfile +++ b/containers/zammad-postgresql/Dockerfile @@ -1,4 +1,4 @@ -FROM postgres:10.1-alpine +FROM postgres:9.6-alpine MAINTAINER Zammad ARG BUILD_DATE diff --git a/containers/zammad/Dockerfile b/containers/zammad/Dockerfile index 455ea40..6106487 100644 --- a/containers/zammad/Dockerfile +++ b/containers/zammad/Dockerfile @@ -8,11 +8,11 @@ ENV RAILS_ENV production ENV RAILS_SERVER puma ENV PROJECT_URL https://github.com/zammad/zammad ENV GIT_URL ${PROJECT_URL}.git -ENV GIT_BRANCH develop +ENV GIT_BRANCH stable ENV ZAMMAD_TMP_DIR /tmp/zammad-${GIT_BRANCH} ENV TAR_GZ_URL ${PROJECT_URL}/archive/${GIT_BRANCH}.tar.gz ENV GOSU_VERSION 1.10 -ENV ZAMMAD_READY_FILE tmp/zammad.ready +ENV ZAMMAD_READY_FILE ${ZAMMAD_DIR}/tmp/zammad.ready LABEL org.label-schema.build-date="$BUILD_DATE" \ org.label-schema.name="Zammad" \ diff --git a/containers/zammad/docker-entrypoint.sh b/containers/zammad/docker-entrypoint.sh index 94553f6..972e36e 100644 --- a/containers/zammad/docker-entrypoint.sh +++ b/containers/zammad/docker-entrypoint.sh @@ -12,7 +12,7 @@ set -e : "${NGINX_SERVER_NAME:=_}" function check_zammad_ready { - until [ -f "${ZAMMAD_DIR}/${ZAMMAD_READY_FILE}" ]; do + until [ -f "${ZAMMAD_READY_FILE}" ]; do echo "waiting for install or update to be ready..." sleep 5 done @@ -26,8 +26,8 @@ if [ "$1" = 'zammad-init' ]; then done # install / update zammad - rsync -av --delete --exclude 'storage/fs/*' --exclude 'public/assets/images/*' ${ZAMMAD_TMP_DIR}/ ${ZAMMAD_DIR} - rsync -av ${ZAMMAD_TMP_DIR}/public/assets/images/ ${ZAMMAD_DIR}/public/assets/images + rsync -a --delete --exclude 'storage/fs/*' --exclude 'public/assets/images/*' ${ZAMMAD_TMP_DIR}/ ${ZAMMAD_DIR} + rsync -a ${ZAMMAD_TMP_DIR}/public/assets/images/ ${ZAMMAD_DIR}/public/assets/images cd ${ZAMMAD_DIR} @@ -69,7 +69,7 @@ if [ "$1" = 'zammad-init' ]; then chown -R ${ZAMMAD_USER}:${ZAMMAD_USER} ${ZAMMAD_DIR} # create install ready file - su -c "echo 'zammad-init' > ${ZAMMAD_DIR}/${ZAMMAD_READY_FILE}" ${ZAMMAD_USER} + su -c "echo 'zammad-init' > ${ZAMMAD_READY_FILE}" ${ZAMMAD_USER} fi @@ -80,12 +80,12 @@ if [ "$1" = 'zammad-nginx' ]; then sed -e "s#server .*:3000#server ${ZAMMAD_RAILSSERVER_HOST}:3000#g" -e "s#server .*:6042#server ${ZAMMAD_WEBSOCKET_HOST}:6042#g" -e "s#server_name .*#server_name ${NGINX_SERVER_NAME};#g" -e 's#/var/log/nginx/zammad.\(access\|error\).log#/dev/stdout#g' < contrib/nginx/zammad.conf > /etc/nginx/sites-enabled/default fi - until [ -f "${ZAMMAD_DIR}/${ZAMMAD_READY_FILE}" ] && [ -n "$(grep zammad-railsserver < ${ZAMMAD_DIR}/${ZAMMAD_READY_FILE})" ] && [ -n "$(grep zammad-scheduler < ${ZAMMAD_DIR}/${ZAMMAD_READY_FILE})" ] && [ -n "$(grep zammad-websocket < ${ZAMMAD_DIR}/${ZAMMAD_READY_FILE})" ] ; do + until [ -f "${ZAMMAD_READY_FILE}" ] && [ -n "$(grep zammad-railsserver < ${ZAMMAD_READY_FILE})" ] && [ -n "$(grep zammad-scheduler < ${ZAMMAD_READY_FILE})" ] && [ -n "$(grep zammad-websocket < ${ZAMMAD_READY_FILE})" ] ; do echo "waiting for all zammad services to start..." sleep 5 done - rm ${ZAMMAD_DIR}/${ZAMMAD_READY_FILE} + rm ${ZAMMAD_READY_FILE} echo "starting nginx..." @@ -101,9 +101,9 @@ if [ "$1" = 'zammad-railsserver' ]; then echo "starting railsserver..." - echo "zammad-railsserver" >> ${ZAMMAD_DIR}/${ZAMMAD_READY_FILE} + echo "zammad-railsserver" >> ${ZAMMAD_READY_FILE} - exec gosu ${ZAMMAD_USER}:${ZAMMAD_USER} bundle exec rails server puma -b [::] -p 3000 -e ${RAILS_ENV} + exec gosu ${ZAMMAD_USER}:${ZAMMAD_USER} bundle exec rails server puma -b [::] -p 3000 -e ${RAILS_ENV} fi @@ -115,7 +115,7 @@ if [ "$1" = 'zammad-scheduler' ]; then echo "starting scheduler..." - echo "zammad-scheduler" >> ${ZAMMAD_DIR}/${ZAMMAD_READY_FILE} + echo "zammad-scheduler" >> ${ZAMMAD_READY_FILE} exec gosu ${ZAMMAD_USER}:${ZAMMAD_USER} bundle exec script/scheduler.rb run fi @@ -129,7 +129,7 @@ if [ "$1" = 'zammad-websocket' ]; then echo "starting websocket server..." - echo "zammad-websocket" >> ${ZAMMAD_DIR}/${ZAMMAD_READY_FILE} + echo "zammad-websocket" >> ${ZAMMAD_READY_FILE} exec gosu ${ZAMMAD_USER}:${ZAMMAD_USER} bundle exec script/websocket-server.rb -b 0.0.0.0 -p 6042 start fi diff --git a/kubernetes/40_deployment_zammad.yaml b/kubernetes/40_deployment_zammad.yaml index 342ce80..9d07b3d 100644 --- a/kubernetes/40_deployment_zammad.yaml +++ b/kubernetes/40_deployment_zammad.yaml @@ -26,7 +26,7 @@ spec: initContainers: - name: zammad-init - image: monotek/zammad-docker-compose:zammad + image: zammad/zammad-docker-compose:zammad args: [ "zammad-init" ] imagePullPolicy: Always volumeMounts: @@ -35,7 +35,7 @@ spec: containers: - name: zammad-nginx - image: monotek/zammad-docker-compose:zammad + image: zammad/zammad-docker-compose:zammad args: [ "zammad-nginx" ] ports: - containerPort: 80 @@ -60,7 +60,7 @@ spec: periodSeconds: 10 - name: zammad-railsserver - image: monotek/zammad-docker-compose:zammad + image: zammad/zammad-docker-compose:zammad args: ["zammad-railsserver"] imagePullPolicy: Always ports: @@ -83,7 +83,7 @@ spec: periodSeconds: 10 - name: zammad-scheduler - image: monotek/zammad-docker-compose:zammad + image: zammad/zammad-docker-compose:zammad args: [ "zammad-scheduler" ] imagePullPolicy: Always volumeMounts: @@ -91,7 +91,7 @@ spec: mountPath: /opt/zammad - name: zammad-websocket - image: monotek/zammad-docker-compose:zammad + image: zammad/zammad-docker-compose:zammad args: [ "zammad-websocket" ] imagePullPolicy: Always ports: diff --git a/kubernetes/42_deployment_memcached.yaml b/kubernetes/42_deployment_memcached.yaml index 749dea6..5e9593e 100644 --- a/kubernetes/42_deployment_memcached.yaml +++ b/kubernetes/42_deployment_memcached.yaml @@ -16,7 +16,7 @@ spec: containers: - name: zammad-memcached - image: monotek/zammad-docker-compose:zammad-memcached + image: zammad/zammad-docker-compose:zammad-memcached args: [ "zammad-memcached" ] ports: - containerPort: 11211 diff --git a/kubernetes/43_deployment_postgesql.yaml b/kubernetes/43_deployment_postgesql.yaml index 744c6e6..f76c3f4 100644 --- a/kubernetes/43_deployment_postgesql.yaml +++ b/kubernetes/43_deployment_postgesql.yaml @@ -20,7 +20,7 @@ spec: containers: - name: zammad-postgresql - image: monotek/zammad-docker-compose:zammad-postgresql + image: zammad/zammad-docker-compose:zammad-postgresql ports: - name: postgresql containerPort: 5432