-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
issue #6 add xdebug host address and dns for host trhought internal n… #16
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,18 +7,25 @@ shopt -s nocasematch | |
if [ -z ${TZ+x} ]; then | ||
echo "Warning : TimeZone is unset !"; | ||
else | ||
ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone ; | ||
sudo ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ | sudo tee /etc/timezone ; | ||
fi | ||
|
||
if [ $XDEBUG_ENABLE == "true" ]; then | ||
sudo sed -i "s#XDEBUG_REMOTE_HOST#$(ip r | awk '/default/{print $3}')#" /usr/local/etc/php/conf.d/xdebug.ini | ||
else | ||
echo "XDebug disabled"; | ||
fi | ||
|
||
if [ $REMOTE_HOST_ENABLE == "true" ]; then | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why configuring this variable if xdebug is disabled ? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's in case you need the DNS for the host for something else (no more need for the external_host with the ip of the host, you can use the docker internal network) |
||
if ! grep -Fxq "remote_host" /etc/hosts; then | ||
echo "$(ip r | awk '/default/{print $3}') remote_host" | sudo tee --append /etc/hosts | ||
fi; | ||
else | ||
echo "remote host disabled"; | ||
fi | ||
# Starting the custom entrypointf it exists | ||
if [ -f /docker/custom-entrypoint.sh ]; then | ||
source /config/custom-entrypoint.sh | ||
fi | ||
|
||
# Moving static files to a sharedVolume with the nginx | ||
rm -rf /nginx/* | ||
if [ -d "/var/www/html/public" ]; then | ||
cp -rf /var/www/html/public /nginx | ||
fi | ||
|
||
exec "$@" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As it's a specific configuration it's better to add a specific file like
ADD config/custom-php.ini /usr/local/etc/php/conf.d/custom-php.ini