- changed tmp file var to use full path

- switched back to postgresql 9.6 (10.x with next release)
- switched back to zammad image repos
- switched back to stable branch (dalli gem now included)
This commit is contained in:
André Bauer 2017-12-07 15:20:21 +01:00
parent 128fde37f2
commit b3fb17c6ad
7 changed files with 21 additions and 21 deletions

2
.env
View File

@ -1,4 +1,4 @@
# don't forget to add the minus before the version # don't forget to add the minus before the version
# example: VERSION=-2.1.0-13 # example: VERSION=-2.1.0-13
IMAGE_REPO=monotek/zammad-docker-compose IMAGE_REPO=zammad/zammad-docker-compose
VERSION= VERSION=

View File

@ -1,4 +1,4 @@
FROM postgres:10.1-alpine FROM postgres:9.6-alpine
MAINTAINER Zammad <info@zammad.org> MAINTAINER Zammad <info@zammad.org>
ARG BUILD_DATE ARG BUILD_DATE

View File

@ -8,11 +8,11 @@ ENV RAILS_ENV production
ENV RAILS_SERVER puma ENV RAILS_SERVER puma
ENV PROJECT_URL https://github.com/zammad/zammad ENV PROJECT_URL https://github.com/zammad/zammad
ENV GIT_URL ${PROJECT_URL}.git ENV GIT_URL ${PROJECT_URL}.git
ENV GIT_BRANCH develop ENV GIT_BRANCH stable
ENV ZAMMAD_TMP_DIR /tmp/zammad-${GIT_BRANCH} ENV ZAMMAD_TMP_DIR /tmp/zammad-${GIT_BRANCH}
ENV TAR_GZ_URL ${PROJECT_URL}/archive/${GIT_BRANCH}.tar.gz ENV TAR_GZ_URL ${PROJECT_URL}/archive/${GIT_BRANCH}.tar.gz
ENV GOSU_VERSION 1.10 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" \ LABEL org.label-schema.build-date="$BUILD_DATE" \
org.label-schema.name="Zammad" \ org.label-schema.name="Zammad" \

View File

@ -12,7 +12,7 @@ set -e
: "${NGINX_SERVER_NAME:=_}" : "${NGINX_SERVER_NAME:=_}"
function check_zammad_ready { 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..." echo "waiting for install or update to be ready..."
sleep 5 sleep 5
done done
@ -26,8 +26,8 @@ if [ "$1" = 'zammad-init' ]; then
done done
# install / update zammad # install / update zammad
rsync -av --delete --exclude 'storage/fs/*' --exclude 'public/assets/images/*' ${ZAMMAD_TMP_DIR}/ ${ZAMMAD_DIR} rsync -a --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 ${ZAMMAD_TMP_DIR}/public/assets/images/ ${ZAMMAD_DIR}/public/assets/images
cd ${ZAMMAD_DIR} cd ${ZAMMAD_DIR}
@ -69,7 +69,7 @@ if [ "$1" = 'zammad-init' ]; then
chown -R ${ZAMMAD_USER}:${ZAMMAD_USER} ${ZAMMAD_DIR} chown -R ${ZAMMAD_USER}:${ZAMMAD_USER} ${ZAMMAD_DIR}
# create install ready file # 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 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 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 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..." echo "waiting for all zammad services to start..."
sleep 5 sleep 5
done done
rm ${ZAMMAD_DIR}/${ZAMMAD_READY_FILE} rm ${ZAMMAD_READY_FILE}
echo "starting nginx..." echo "starting nginx..."
@ -101,7 +101,7 @@ if [ "$1" = 'zammad-railsserver' ]; then
echo "starting railsserver..." 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 fi
@ -115,7 +115,7 @@ if [ "$1" = 'zammad-scheduler' ]; then
echo "starting scheduler..." 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 exec gosu ${ZAMMAD_USER}:${ZAMMAD_USER} bundle exec script/scheduler.rb run
fi fi
@ -129,7 +129,7 @@ if [ "$1" = 'zammad-websocket' ]; then
echo "starting websocket server..." 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 exec gosu ${ZAMMAD_USER}:${ZAMMAD_USER} bundle exec script/websocket-server.rb -b 0.0.0.0 -p 6042 start
fi fi

View File

@ -26,7 +26,7 @@ spec:
initContainers: initContainers:
- name: zammad-init - name: zammad-init
image: monotek/zammad-docker-compose:zammad image: zammad/zammad-docker-compose:zammad
args: [ "zammad-init" ] args: [ "zammad-init" ]
imagePullPolicy: Always imagePullPolicy: Always
volumeMounts: volumeMounts:
@ -35,7 +35,7 @@ spec:
containers: containers:
- name: zammad-nginx - name: zammad-nginx
image: monotek/zammad-docker-compose:zammad image: zammad/zammad-docker-compose:zammad
args: [ "zammad-nginx" ] args: [ "zammad-nginx" ]
ports: ports:
- containerPort: 80 - containerPort: 80
@ -60,7 +60,7 @@ spec:
periodSeconds: 10 periodSeconds: 10
- name: zammad-railsserver - name: zammad-railsserver
image: monotek/zammad-docker-compose:zammad image: zammad/zammad-docker-compose:zammad
args: ["zammad-railsserver"] args: ["zammad-railsserver"]
imagePullPolicy: Always imagePullPolicy: Always
ports: ports:
@ -83,7 +83,7 @@ spec:
periodSeconds: 10 periodSeconds: 10
- name: zammad-scheduler - name: zammad-scheduler
image: monotek/zammad-docker-compose:zammad image: zammad/zammad-docker-compose:zammad
args: [ "zammad-scheduler" ] args: [ "zammad-scheduler" ]
imagePullPolicy: Always imagePullPolicy: Always
volumeMounts: volumeMounts:
@ -91,7 +91,7 @@ spec:
mountPath: /opt/zammad mountPath: /opt/zammad
- name: zammad-websocket - name: zammad-websocket
image: monotek/zammad-docker-compose:zammad image: zammad/zammad-docker-compose:zammad
args: [ "zammad-websocket" ] args: [ "zammad-websocket" ]
imagePullPolicy: Always imagePullPolicy: Always
ports: ports:

View File

@ -16,7 +16,7 @@ spec:
containers: containers:
- name: zammad-memcached - name: zammad-memcached
image: monotek/zammad-docker-compose:zammad-memcached image: zammad/zammad-docker-compose:zammad-memcached
args: [ "zammad-memcached" ] args: [ "zammad-memcached" ]
ports: ports:
- containerPort: 11211 - containerPort: 11211

View File

@ -20,7 +20,7 @@ spec:
containers: containers:
- name: zammad-postgresql - name: zammad-postgresql
image: monotek/zammad-docker-compose:zammad-postgresql image: zammad/zammad-docker-compose:zammad-postgresql
ports: ports:
- name: postgresql - name: postgresql
containerPort: 5432 containerPort: 5432