+ heroku docker

This commit is contained in:
felegy
2022-06-10 15:06:45 +02:00
parent 039d95726c
commit e68f6ff23d
17 changed files with 5478 additions and 114 deletions

36
.dev/entrypoint-dev.sh Normal file
View 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"