Skip to content
Snippets Groups Projects
Commit ebf826e2 authored by Robert Lange's avatar Robert Lange
Browse files

refs #24469 [finc] composer docker addendum: make composer version configurable

* also refs 23937
parent f0a65b74
No related merge requests found
# Dependencies for grunt task (scss => css)
GRUNT_SASS=^3.1.0
JIT_GRUNT=^0.10.0
NODE_SASS=^7.0.1
PHPVERSION=php7_2
\ No newline at end of file
# Dependencies for composer task (loads files for vendor)
COMPOSER_VERSION=composer2
# Version for php in PHP container
PHP_VERSION=php7_2
\ No newline at end of file
# Copyright (C) 2020 Leipzig University Library
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# @author Sebastian Kehr <kehr@ub.uni-leipzig.de>
# @license https://opensource.org/licenses/GPL-3.0 GNU GPLv3
FROM composer:1.9.3
RUN apk add --no-cache freetype-dev libxml2-dev icu-dev \
&& docker-php-ext-install gd \
&& docker-php-ext-install soap \
&& docker-php-ext-install intl
\ No newline at end of file
#!/usr/bin/env sh
# Copyright (C) 2020 Leipzig University Library
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# @author Sebastian Kehr <kehr@ub.uni-leipzig.de>
# @license https://opensource.org/licenses/GPL-3.0 GNU GPLv3
if [ "$(whoami)" = "php" ]; then
mkdir -p "$COMPOSER_HOME"
exec /docker-entrypoint.sh "$@"
exit
fi
until ! (ping -c1 env >/dev/null 2>&1) && [ -f ./data/docker/env/composer ]; do :; done
set -a; . ./data/docker/env/composer; set +a
: "${UIDGID:=$(stat -c '%u' .):$(stat -c '%g' .)}"
echo "php:x:$UIDGID:php:$(pwd):/bin/sh" >> /etc/passwd
chown "$UIDGID" "$(command -v composer)"
su -p -c "exec $0 $*" php
\ No newline at end of file
......@@ -9,7 +9,7 @@ services:
entrypoint: ["devops/docker/env/entrypoint.sh"]
composer:
build: devops/docker/composer
build: devops/docker/${COMPOSER_VERSION:-composer1}
working_dir: /usr/local/vufind
volumes:
- .:/usr/local/vufind:rw
......@@ -17,18 +17,18 @@ services:
- $HOME/.ssh/known_hosts:/etc/ssh/ssh_known_hosts
depends_on:
- env
entrypoint: ["devops/docker/composer/entrypoint.sh"]
entrypoint: devops/docker/${COMPOSER_VERSION:-composer1}/entrypoint.sh
command: ["install"]
php:
build: devops/docker/${PHPVERSION:-php7_2}
build: devops/docker/${PHP_VERSION:-php7_2}
working_dir: /usr/local/vufind
volumes:
- ./:/usr/local/vufind
depends_on:
- env
- db
entrypoint: devops/docker/${PHPVERSION:-php7_2}/entrypoint.sh
entrypoint: devops/docker/${PHP_VERSION:-php7_2}/entrypoint.sh
command: ["php-fpm"]
httpd:
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment