You've already forked hotpocket
This commit is contained in:
3
services/base/ops/bin/check-virtualenv.sh
Executable file
3
services/base/ops/bin/check-virtualenv.sh
Executable file
@@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
${VIRTUAL_ENV}/bin/python -c "import this"
|
||||
28
services/base/ops/bin/entrypoint.sh
Executable file
28
services/base/ops/bin/entrypoint.sh
Executable file
@@ -0,0 +1,28 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
export PYTHONPATH="/srv/app:$PYTHONPATH"
|
||||
|
||||
SETUP_BACKEND=${SETUP_BACKEND:-"false"}
|
||||
SETUP_FRONTEND=${SETUP_FRONTEND:-"false"}
|
||||
|
||||
/srv/bin/wait-for-cloud.sh
|
||||
|
||||
if [ "${SETUP_BACKEND}" = "true" ];then
|
||||
if [ "${RUN_POETRY_INSTALL}" = "true" ];then
|
||||
poetry install --no-ansi --no-cache
|
||||
else
|
||||
/srv/bin/wait-for-virtualenv.sh
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "${SETUP_FRONTEND}" = "true" ];then
|
||||
if [ "${RUN_YARN_INSTALL}" = "true" ];then
|
||||
yarn --modules-folder /srv/node_modules/ install --frozen-lockfile
|
||||
else
|
||||
/srv/bin/wait-for-yarn-env.sh
|
||||
fi
|
||||
fi
|
||||
|
||||
exec "$@"
|
||||
18
services/base/ops/bin/wait-for-cloud.sh
Executable file
18
services/base/ops/bin/wait-for-cloud.sh
Executable file
@@ -0,0 +1,18 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ -x "$(command -v 'wait-for-it')" ];then
|
||||
if [ ! -z "${POSTGRES_HOSTPORT}" ];then
|
||||
echo "Waiting for postgres at ${POSTGRES_HOSTPORT}..."
|
||||
wait-for-it -t 60 "${POSTGRES_HOSTPORT}" && echo "postgres is up"
|
||||
fi
|
||||
|
||||
if [ ! -z "${RABBITMQ_HOSTPORT}" ];then
|
||||
echo "Waiting for rabbitmq at ${RABBITMQ_HOSTPORT}..."
|
||||
wait-for-it -t 60 "${RABBITMQ_HOSTPORT}" && echo "rabbitmq is up"
|
||||
fi
|
||||
|
||||
if [ ! -z "${KEYCLOAK_HOSTPORT}" ];then
|
||||
echo "Waiting for keycloak at ${KEYCLOAK_HOSTPORT}..."
|
||||
wait-for-it -t 60 "${KEYCLOAK_HOSTPORT}" && echo "keycloak is up"
|
||||
fi
|
||||
fi
|
||||
10
services/base/ops/bin/wait-for-virtualenv.sh
Executable file
10
services/base/ops/bin/wait-for-virtualenv.sh
Executable file
@@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ ! -z "${VIRTUAL_ENV}" ];then
|
||||
echo "Waiting for virtual env... "
|
||||
/srv/bin/check-virtualenv.sh >/dev/null 2>&1
|
||||
while [ $? -ne 0 ];do
|
||||
/srv/bin/check-virtualenv.sh >/dev/null 2>&1
|
||||
done
|
||||
echo "virtual env is ready"
|
||||
fi
|
||||
10
services/base/ops/bin/wait-for-yarn-env.sh
Executable file
10
services/base/ops/bin/wait-for-yarn-env.sh
Executable file
@@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ ! -z "${YARN_MODULES_FOLDER}" ];then
|
||||
echo "Waiting for yarn env... "
|
||||
yarn --modules-folder /srv/node_modules/ run eslint --help >/dev/null 2>&1
|
||||
while [ $? -ne 0 ];do
|
||||
yarn --modules-folder /srv/node_modules/ run eslint --help >/dev/null 2>&1
|
||||
done
|
||||
echo "yarn env is ready"
|
||||
fi
|
||||
Reference in New Issue
Block a user