forked from localstack/localstack
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-entrypoint.sh
More file actions
executable file
·35 lines (28 loc) · 878 Bytes
/
docker-entrypoint.sh
File metadata and controls
executable file
·35 lines (28 loc) · 878 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/bin/bash
set -eo pipefail
shopt -s nullglob
# Strip `LOCALSTACK_` prefix in environment variables name (except LOCALSTACK_HOSTNAME)
source <(
env |
grep -v -e '^LOCALSTACK_HOSTNAME' |
grep -v -e '^LOCALSTACK_[[:digit:]]' | # See issue #1387
sed -ne 's/^LOCALSTACK_\([^=]\+\)=.*/export \1=${LOCALSTACK_\1}/p'
)
supervisord -c /etc/supervisord.conf &
function run_startup_scripts {
until grep -q "^Ready.$" /tmp/localstack_infra.log >/dev/null 2>&1 ; do
echo "Waiting for all LocalStack services to be ready"
sleep 7
done
for f in /docker-entrypoint-initaws.d/*; do
case "$f" in
*.sh) echo "$0: running $f"; . "$f" ;;
*) echo "$0: ignoring $f" ;;
esac
echo
done
}
run_startup_scripts &
touch /tmp/localstack_infra.log
touch /tmp/localstack_infra.err
tail -qF /tmp/localstack_infra.log /tmp/localstack_infra.err