+ heroku docker
This commit is contained in:
36
.dev/entrypoint-dev.sh
Normal file
36
.dev/entrypoint-dev.sh
Normal file
@@ -0,0 +1,36 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
COMMAND=$*
|
||||
|
||||
if [ ! -d /app/.heroku ]; then
|
||||
cp -r /workspace/.heroku /app
|
||||
fi
|
||||
|
||||
if [ ! -f /app/.profile.d/100-php.sh ]; then
|
||||
cp -r /workspace/.profile.d /app
|
||||
fi
|
||||
|
||||
XDEBUG_ENABLE=${XDEBUG_ENABLE-0}
|
||||
export XDEBUG_ENABLE
|
||||
|
||||
rm -f /app/.heroku/php/etc/php/conf.d/999-xdebug.ini
|
||||
|
||||
if [ "$XDEBUG_ENABLE" = 1 ]; then
|
||||
ln -sn $(pwd)/.dev/xdebug.ini /app/.heroku/php/etc/php/conf.d/999-xdebug.ini
|
||||
fi
|
||||
|
||||
PATH="/workspace/bin:$PATH"
|
||||
export PATH
|
||||
|
||||
HISTFILE=${HISTFILE-/tmp/.bash_history}
|
||||
export HISTFILE
|
||||
|
||||
keys=$(yq e '. | keys' Procfile | cut -c 3-)
|
||||
|
||||
for key in $keys; do
|
||||
echo '#!/usr/bin/env bash' > "/workspace/bin/$key"
|
||||
yq e ".$key" Procfile >> "/workspace/bin/$key"
|
||||
chmod +x "/workspace/bin/$key"
|
||||
done
|
||||
|
||||
bash -l -c "$COMMAND"
|
||||
Reference in New Issue
Block a user