fixed update
This commit is contained in:
parent
d438b5378d
commit
b904f63148
@ -10,10 +10,11 @@ if [ "$1" = 'zammad-railsserver' ]; then
|
|||||||
|
|
||||||
echo "railsserver can access postgresql server now..."
|
echo "railsserver can access postgresql server now..."
|
||||||
|
|
||||||
|
rsync -a --delete ${ZAMMAD_TMP_DIR}/ ${ZAMMAD_DIR}
|
||||||
|
|
||||||
cd ${ZAMMAD_DIR}
|
cd ${ZAMMAD_DIR}
|
||||||
|
|
||||||
# update zammad
|
# update zammad
|
||||||
git pull
|
|
||||||
gem update bundler
|
gem update bundler
|
||||||
bundle install
|
bundle install
|
||||||
|
|
||||||
@ -33,9 +34,6 @@ if [ "$1" = 'zammad-railsserver' ]; then
|
|||||||
|
|
||||||
chown -R ${ZAMMAD_USER}:${ZAMMAD_USER} ${ZAMMAD_DIR}
|
chown -R ${ZAMMAD_USER}:${ZAMMAD_USER} ${ZAMMAD_DIR}
|
||||||
|
|
||||||
# delete logs
|
|
||||||
find ${ZAMMAD_DIR}/log -iname *.log -exec rm {} \;
|
|
||||||
|
|
||||||
# run zammad
|
# run zammad
|
||||||
echo "starting zammad..."
|
echo "starting zammad..."
|
||||||
echo "zammad will be accessable on http://localhost in some seconds"
|
echo "zammad will be accessable on http://localhost in some seconds"
|
||||||
|
@ -3,6 +3,7 @@ MAINTAINER Zammad <info@zammad.org>
|
|||||||
ARG BUILD_DATE
|
ARG BUILD_DATE
|
||||||
|
|
||||||
ENV ZAMMAD_DIR /home/zammad
|
ENV ZAMMAD_DIR /home/zammad
|
||||||
|
ENV ZAMMAD_TMP_DIR /tmp/zammad
|
||||||
ENV ZAMMAD_USER zammad
|
ENV ZAMMAD_USER zammad
|
||||||
ENV RAILS_ENV production
|
ENV RAILS_ENV production
|
||||||
ENV RAILS_SERVER puma
|
ENV RAILS_SERVER puma
|
||||||
@ -22,7 +23,7 @@ LABEL org.label-schema.build-date="$BUILD_DATE" \
|
|||||||
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"
|
||||||
|
|
||||||
# install dependencies, GOSU & zammad
|
# install dependencies, GOSU & zammad
|
||||||
RUN BUILD_DEPENDENCIES="git build-essential libffi-dev libpq5 libpq-dev" \
|
RUN BUILD_DEPENDENCIES="git build-essential libffi-dev libpq5 libpq-dev rsync" \
|
||||||
GOSU_DEPENDENCIES="ca-certificates wget" \
|
GOSU_DEPENDENCIES="ca-certificates wget" \
|
||||||
set -ex \
|
set -ex \
|
||||||
&& apt-get update && apt-get install -y --force-yes --no-install-recommends ${BUILD_DEPENDENCIES} ${GOSU_DEPENDENCIES} && rm -rf /var/lib/apt/lists/* \
|
&& apt-get update && apt-get install -y --force-yes --no-install-recommends ${BUILD_DEPENDENCIES} ${GOSU_DEPENDENCIES} && rm -rf /var/lib/apt/lists/* \
|
||||||
@ -35,15 +36,15 @@ RUN BUILD_DEPENDENCIES="git build-essential libffi-dev libpq5 libpq-dev" \
|
|||||||
&& chmod +x /usr/local/bin/gosu \
|
&& chmod +x /usr/local/bin/gosu \
|
||||||
&& gosu nobody true \
|
&& gosu nobody true \
|
||||||
&& useradd -M -d ${ZAMMAD_DIR} -s /bin/bash ${ZAMMAD_USER} \
|
&& useradd -M -d ${ZAMMAD_DIR} -s /bin/bash ${ZAMMAD_USER} \
|
||||||
&& cd $(dirname ${ZAMMAD_DIR}) \
|
&& cd $(dirname ${ZAMMAD_TMP_DIR}) \
|
||||||
&& git clone --depth 1 -b "${GIT_BRANCH}" "${GIT_URL}" \
|
&& git clone --depth 1 -b "${GIT_BRANCH}" "${GIT_URL}" \
|
||||||
&& cd ${ZAMMAD_DIR} \
|
&& cd ${ZAMMAD_TMP_DIR} \
|
||||||
&& bundle install --without test development mysql \
|
&& bundle install --without test development mysql \
|
||||||
&& contrib/packager.io/fetch_locales.rb \
|
&& contrib/packager.io/fetch_locales.rb \
|
||||||
&& sed -e 's#.*adapter: postgresql# adapter: nulldb#g' -e 's#.*username:.*# username: postgres#g' -e 's#.*password:.*# password: \n host: zammad-postgresql\n#g' < config/database.yml.pkgr > config/database.yml \
|
&& sed -e 's#.*adapter: postgresql# adapter: nulldb#g' -e 's#.*username:.*# username: postgres#g' -e 's#.*password:.*# password: \n host: zammad-postgresql\n#g' < config/database.yml.pkgr > config/database.yml \
|
||||||
&& bundle exec rake assets:precompile \
|
&& bundle exec rake assets:precompile \
|
||||||
&& sed -e 's#.*adapter: postgresql# adapter: postgresql#g' -e 's#.*username:.*# username: postgres#g' -e 's#.*password:.*# password: \n host: zammad-postgresql\n#g' < config/database.yml.pkgr > config/database.yml \
|
&& sed -e 's#.*adapter: postgresql# adapter: postgresql#g' -e 's#.*username:.*# username: postgres#g' -e 's#.*password:.*# password: \n host: zammad-postgresql\n#g' < config/database.yml.pkgr > config/database.yml \
|
||||||
&& rm -r tmp/cache \
|
&& rm -r tmp/cache \
|
||||||
&& chown -R ${ZAMMAD_USER}:${ZAMMAD_USER} ${ZAMMAD_DIR}
|
&& chown -R ${ZAMMAD_USER}:${ZAMMAD_USER} ${ZAMMAD_TMP_DIR}
|
||||||
|
|
||||||
WORKDIR ${ZAMMAD_DIR}
|
WORKDIR ${ZAMMAD_DIR}
|
||||||
|
Loading…
Reference in New Issue
Block a user