Skip to content
Snippets Groups Projects
Commit 42b9bff1 authored by Sebastian Kehr's avatar Sebastian Kehr :rowboat_tone2:
Browse files

refs #17113 [master-v5] wait until expected env files exist

parent 6fec24b5
No related merge requests found
...@@ -17,8 +17,8 @@ ...@@ -17,8 +17,8 @@
# @author Sebastian Kehr <kehr@ub.uni-leipzig.de> # @author Sebastian Kehr <kehr@ub.uni-leipzig.de>
# @license https://opensource.org/licenses/GPL-3.0 GNU GPLv3 # @license https://opensource.org/licenses/GPL-3.0 GNU GPLv3
until ! ping -c1 env >/dev/null 2>&1; do :; done until ! (ping -c1 env >/dev/null 2>&1) && [ -f ./data/docker/env/autoconfig ]; do :; done
set -a; [ -f ./data/docker/env/autoconfig ] && . ./data/docker/env/autoconfig; set +a set -a; . ./data/docker/env/autoconfig; set +a
if [ "$(whoami)" = "node" ]; then if [ "$(whoami)" = "node" ]; then
[ -d "$HOME" ] || PREFIX=$HOME npm install -g @ubleipzig/autoconfig@2.3.2 [ -d "$HOME" ] || PREFIX=$HOME npm install -g @ubleipzig/autoconfig@2.3.2
......
...@@ -23,8 +23,8 @@ if [ "$(whoami)" = "php" ]; then ...@@ -23,8 +23,8 @@ if [ "$(whoami)" = "php" ]; then
exit exit
fi fi
until ! ping -c1 env >/dev/null 2>&1; do :; done until ! (ping -c1 env >/dev/null 2>&1) && [ -f ./data/docker/env/composer ]; do :; done
set -a; [ -f ./data/docker/env/composer ] && . ./data/docker/env/composer; set +a set -a; . ./data/docker/env/composer; set +a
: "${UIDGID:=$(stat -c '%u' .):$(stat -c '%g' .)}" : "${UIDGID:=$(stat -c '%u' .):$(stat -c '%g' .)}"
echo "php:x:$UIDGID:php::/bin/sh" >> /etc/passwd echo "php:x:$UIDGID:php::/bin/sh" >> /etc/passwd
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
# @author Sebastian Kehr <kehr@ub.uni-leipzig.de> # @author Sebastian Kehr <kehr@ub.uni-leipzig.de>
# @license https://opensource.org/licenses/GPL-3.0 GNU GPLv3 # @license https://opensource.org/licenses/GPL-3.0 GNU GPLv3
until ! ping -c1 env >/dev/null 2>&1; do :; done until ! (ping -c1 env >/dev/null 2>&1) && [ -f ./data/docker/env/db ]; do :; done
set -a; [ -f ./data/docker/env/db ] && . ./data/docker/env/db; set +a set -a; . ./data/docker/env/db; set +a
exec docker-entrypoint.sh "$@" exec docker-entrypoint.sh "$@"
\ No newline at end of file
...@@ -35,8 +35,8 @@ if [ "$(whoami)" = "node" ]; then ...@@ -35,8 +35,8 @@ if [ "$(whoami)" = "node" ]; then
exit exit
fi fi
until ! ping -c1 env >/dev/null 2>&1; do :; done until ! (ping -c1 env >/dev/null 2>&1) && [ -f ./data/docker/env/grunt ]; do :; done
set -a; [ -f ./data/docker/env/grunt ] && . ./data/docker/env/grunt; set +a set -a; . ./data/docker/env/grunt; set +a
trap term_grunt TERM trap term_grunt TERM
: "${UIDGID:=$(stat -c '%u' .):$(stat -c '%g' .)}" : "${UIDGID:=$(stat -c '%u' .):$(stat -c '%g' .)}"
......
...@@ -17,8 +17,8 @@ ...@@ -17,8 +17,8 @@
# @author Sebastian Kehr <kehr@ub.uni-leipzig.de> # @author Sebastian Kehr <kehr@ub.uni-leipzig.de>
# @license https://opensource.org/licenses/GPL-3.0 GNU GPLv3 # @license https://opensource.org/licenses/GPL-3.0 GNU GPLv3
until ! ping -c1 env >/dev/null 2>&1; do :; done until ! (ping -c1 env >/dev/null 2>&1) && [ -f ./data/docker/env/mail ]; do :; done
set -a; [ -f ./data/docker/env/mail ] && . ./data/docker/env/mail; set +a set -a; . ./data/docker/env/mail; set +a
trap 'supervisorctl stop dovecot && supervisorctl stop postfix && exit 0' TERM trap 'supervisorctl stop dovecot && supervisorctl stop postfix && exit 0' TERM
/docker/init "$@" & /docker/init "$@" &
......
...@@ -17,8 +17,8 @@ ...@@ -17,8 +17,8 @@
# @author Sebastian Kehr <kehr@ub.uni-leipzig.de> # @author Sebastian Kehr <kehr@ub.uni-leipzig.de>
# @license https://opensource.org/licenses/GPL-3.0 GNU GPLv3 # @license https://opensource.org/licenses/GPL-3.0 GNU GPLv3
until ! ping -c1 env >/dev/null 2>&1; do :; done until ! (ping -c1 env >/dev/null 2>&1) && [ -f ./data/docker/env/php ]; do :; done
set -a; [ -f ./data/docker/env/php ] && . ./data/docker/env/php; set +a set -a; . ./data/docker/env/php; set +a
: "${UIDGID:=$(stat -c '%u' .):$(stat -c '%g' .)}" : "${UIDGID:=$(stat -c '%u' .):$(stat -c '%g' .)}"
sed -i "s/$(id -u www-data):$(id -g www-data)/$UIDGID/" /etc/passwd sed -i "s/$(id -u www-data):$(id -g www-data)/$UIDGID/" /etc/passwd
......
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