Skip to content

Commit

Permalink
Merge pull request #6 from Turgon37/develop
Browse files Browse the repository at this point in the history
Upgrade GLPI to 9.2.1 to fix #1
  • Loading branch information
Turgon37 authored Feb 3, 2018
2 parents 3999106 + 7868aa0 commit 40a4c3a
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 8 deletions.
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ RUN apk --no-cache add \
php5-pdo_mysql \
php5-mysqli \
php5-openssl \
php5-opcache \
php5-xml \
php5-xmlrpc \
php5-zlib \
supervisor \
tar && \
Expand Down
4 changes: 2 additions & 2 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
DOCKER_USERNAME="${DOCKER_USERNAME:-turgon37}"
# image name
DOCKER_IMAGE="${DOCKER_USERNAME}/${DOCKER_IMAGE:-glpi}"
#
MASTER_BRANCH=master
# "production" branch
MASTER_BRANCH=${MASTER_BRANCH:-master}

## Local settings
build_tags_file="${PWD}/build.sh~tags"
Expand Down
9 changes: 7 additions & 2 deletions deploy.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
#!/usr/bin/env bash

## Global settings
# "production" branch
MASTER_BRANCH=${MASTER_BRANCH:-master}

## Local settings
build_tags_file="${PWD}/build.sh~tags"

## Init conditions

# For branch others than the production one, only build one container with the latest glpi version
[ -n "${GLPI_VERSION}" -a "${VCS_BRANCH}" != "${MASTER_BRANCH}" ] && exit 0

## Deploy
# Authenticate to docker hub
Expand All @@ -13,7 +18,7 @@ echo "$DOCKERHUB_REGISTRY_PASSWORD" | docker login --username="$DOCKERHUB_REGIST
# push each built images
for image in `cat "${build_tags_file}"`; do
echo "-> push ${image}"
#docker push $image
docker push $image
done

# Unauthenticate to docker hub
Expand Down
19 changes: 15 additions & 4 deletions root/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

set -e

basedir="${GLPI_ROOT}"
basedir="${GLPI_PATHS_ROOT}"

## Install plugins

Expand Down Expand Up @@ -86,15 +86,26 @@ if [ "x${GLPI_REMOVE_INSTALLER}" = 'xyes' ]; then
fi


## Files structure
echo "Create file structure..."
for f in _cache _cron _dumps _graphs _lock _log _pictures _plugins _rss _sessions _tmp _uploads; do
dir="${basedir}/files/${f}"
if [ ! -d "${dir}" ]; then
mkdir -p "${dir}"
chown www-data:www-data "${dir}"
chmod u=rwX,g=rwX,o=--- "${dir}"
fi
done


## Files permissions
echo "Set files permissions..."
# address issue https://github.com/Turgon37/docker-glpi/issues/2
if [ "x${GLPI_CHMOD_PATHS_FILES}" = 'xyes' ]; then
chown -R www-data:www-data "${basedir}/files"
chmod -R u=rwX,g=rX,o=--- "${basedir}/files"
chown -R www-data:www-data "${basedir}/files/*/*"
chmod -R u=rwX,g=rX,o=--- "${basedir}/files/*/*"
fi


## Start
echo "Starting up..."
exec /usr/bin/supervisord -c /etc/supervisord.conf

0 comments on commit 40a4c3a

Please sign in to comment.