moved zammad user creation to install script, clone directly to /home without using /tmp
This commit is contained in:
parent
82092f3fba
commit
1403d48b8c
@ -23,9 +23,6 @@ LABEL org.label-schema.build-date="$BUILD_DATE" \
|
||||
EXPOSE 3000
|
||||
EXPOSE 6042
|
||||
|
||||
# add zammad user
|
||||
RUN useradd -m -d /home/zammad -s /bin/bash zammad;chown -R zammad:zammad /home/zammad
|
||||
|
||||
# install zammad
|
||||
COPY install-zammad.sh /tmp
|
||||
RUN chmod +x /tmp/install-zammad.sh;/bin/bash -l -c /tmp/install-zammad.sh
|
||||
|
@ -2,18 +2,33 @@
|
||||
|
||||
set -e
|
||||
|
||||
# install zammad
|
||||
echo "installing zammad..."
|
||||
cd /tmp
|
||||
|
||||
# crreate zammad user
|
||||
useradd -M -d /home/zammad -s /bin/bash zammad
|
||||
|
||||
# # git clone zammad
|
||||
cd /home
|
||||
git clone --depth 1 -b "${GIT_BRANCH}" "${GIT_URL}"
|
||||
cp -R /tmp/zammad/* "${ZAMMAD_DIR}"
|
||||
cp -R /tmp/zammad/.[!.]* "${ZAMMAD_DIR}"
|
||||
|
||||
# install zammad
|
||||
cd "${ZAMMAD_DIR}"
|
||||
rm -rf /tmp/zammad
|
||||
bundle install --without test development mysql
|
||||
|
||||
# fetch locales
|
||||
contrib/packager.io/fetch_locales.rb
|
||||
|
||||
# set nulldb database adapter for assets precompile
|
||||
sed -e 's#.*adapter: postgresql# adapter: nulldb#g' -e 's#.*username:.*# username: postgres#g' -e 's#.*password:.*# password: \n host: postgresql\n#g' < config/database.yml.pkgr > config/database.yml
|
||||
|
||||
# assets precompile
|
||||
bundle exec rake assets:precompile
|
||||
|
||||
# set postgresql database adapter
|
||||
sed -e 's#.*adapter: postgresql# adapter: postgresql#g' -e 's#.*username:.*# username: postgres#g' -e 's#.*password:.*# password: \n host: postgresql\n#g' < config/database.yml.pkgr > config/database.yml
|
||||
|
||||
# delete assets precompile cache
|
||||
rm -r tmp/cache
|
||||
|
||||
# set user & group to zammad
|
||||
chown -R zammad:zammad "${ZAMMAD_DIR}"
|
||||
|
Loading…
Reference in New Issue
Block a user