From dbe3a916f15cd4653badd8cc105ee16d2d6928eb Mon Sep 17 00:00:00 2001 From: dimti Date: Sun, 15 Jan 2023 15:08:15 +0300 Subject: [PATCH] * renaming xdebug scripts for non-conflicts name with user defined scripts in home directory starts with s and q + tail db general log bash helper * correct path to xdebug2 config for previous php 74 version - remove unnecessary laradock example crontab because this script moved crontab-example dir * improve (un)create symlinks script logic * use only newly composer auth path --- bash/tail-db-general-log.sh | 10 ++++++++++ bash/{quit-xdebug.sh => xdebug-quit.sh} | 0 bash/{start-xdebug.sh => xdebug-start.sh} | 0 create-symlinks.sh | 12 +++++++----- docker-compose.base.yml | 6 ++---- dockerfiles/php-fpm/php74.Dockerfile | 2 +- dockerfiles/workspace/laradock.example | 1 - uncreate-symlinks.sh | 14 +++++++++----- 8 files changed, 29 insertions(+), 16 deletions(-) create mode 100644 bash/tail-db-general-log.sh rename bash/{quit-xdebug.sh => xdebug-quit.sh} (100%) rename bash/{start-xdebug.sh => xdebug-start.sh} (100%) delete mode 100644 dockerfiles/workspace/laradock.example diff --git a/bash/tail-db-general-log.sh b/bash/tail-db-general-log.sh new file mode 100644 index 0000000..698e744 --- /dev/null +++ b/bash/tail-db-general-log.sh @@ -0,0 +1,10 @@ +#!/bin/bash +DIR="$(realpath $(dirname "$(readlink -f "$0")")/..)" + +GENERAL_LOG_FILE_PATH="${DIR}/log/mariadb/mariadb.log" + +sudo truncate -s 0 $GENERAL_LOG_FILE_PATH + +clear + +sudo tail -f $GENERAL_LOG_FILE_PATH \ No newline at end of file diff --git a/bash/quit-xdebug.sh b/bash/xdebug-quit.sh similarity index 100% rename from bash/quit-xdebug.sh rename to bash/xdebug-quit.sh diff --git a/bash/start-xdebug.sh b/bash/xdebug-start.sh similarity index 100% rename from bash/start-xdebug.sh rename to bash/xdebug-start.sh diff --git a/create-symlinks.sh b/create-symlinks.sh index ec29355..b84801f 100755 --- a/create-symlinks.sh +++ b/create-symlinks.sh @@ -1,8 +1,10 @@ #!/bin/bash DIR="$(realpath $(dirname "$(readlink -f "$0")"))" -ln -s ${DIR}/bash/start-xdebug.sh ${HOME}/ -ln -s ${DIR}/bash/quit-xdebug.sh ${HOME}/ -ln -s ${DIR}/bash/restart-nginx.sh ${HOME}/ -ln -s ${DIR}/bash/mysql.sh ${HOME}/ -ln -s ${DIR}/bash/enter-to-workspace.sh ${HOME}/ \ No newline at end of file +BASH_SCRIPTS_DIR="${DIR}/bash" + +BASH_SCRIPTS=(ls $BASH_SCRIPTS_DIR) + +for FILENAME in "${BASH_SCRIPTS[@]}"; do + ln -s ${BASH_SCRIPTS_DIR}/${FILENAME} ${HOME}/ +done \ No newline at end of file diff --git a/docker-compose.base.yml b/docker-compose.base.yml index d0e539a..80e0d74 100755 --- a/docker-compose.base.yml +++ b/docker-compose.base.yml @@ -53,7 +53,7 @@ services: secrets: - user_ssh_key - user_known_hosts - - composer_auth2 + - composer_auth inbucket: image: inbucket/inbucket restart: always @@ -92,7 +92,5 @@ secrets: file: ~/.ssh/id_rsa user_known_hosts: file: ~/.ssh/known_hosts - composer1_auth: - file: ~/.composer/auth.json - composer2_auth: + composer_auth: file: ~/.config/composer/auth.json diff --git a/dockerfiles/php-fpm/php74.Dockerfile b/dockerfiles/php-fpm/php74.Dockerfile index 7ca1105..e290b2c 100644 --- a/dockerfiles/php-fpm/php74.Dockerfile +++ b/dockerfiles/php-fpm/php74.Dockerfile @@ -30,7 +30,7 @@ RUN if [ ${INSTALL_PEAR_MAIL} = true ]; then \ ########################################################################### # Copy xdebug configuration for remote debugging -COPY ./xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini +COPY ./xdebug2/xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini ########################################################################### # Tune opts: diff --git a/dockerfiles/workspace/laradock.example b/dockerfiles/workspace/laradock.example deleted file mode 100644 index 482c6ce..0000000 --- a/dockerfiles/workspace/laradock.example +++ /dev/null @@ -1 +0,0 @@ -#* * * * * laradock /usr/bin/php /var/www/artisan schedule:run >> /dev/null 2>&1 diff --git a/uncreate-symlinks.sh b/uncreate-symlinks.sh index a19d802..b84801f 100755 --- a/uncreate-symlinks.sh +++ b/uncreate-symlinks.sh @@ -1,6 +1,10 @@ #!/bin/bash -rm ${HOME}/start-xdebug.sh -rm ${HOME}/quit-xdebug.sh -rm ${HOME}/restart-nginx.sh -rm ${HOME}/mysql.sh -rm ${HOME}/enter-to-workspace.sh \ No newline at end of file +DIR="$(realpath $(dirname "$(readlink -f "$0")"))" + +BASH_SCRIPTS_DIR="${DIR}/bash" + +BASH_SCRIPTS=(ls $BASH_SCRIPTS_DIR) + +for FILENAME in "${BASH_SCRIPTS[@]}"; do + ln -s ${BASH_SCRIPTS_DIR}/${FILENAME} ${HOME}/ +done \ No newline at end of file