commit cde74880842e27d12e200f82d1b4e8b37880ca38 Author: dimti Date: Thu Aug 17 23:46:24 2023 +0300 Initial commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a09c56d --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/.idea diff --git a/.gitignore-example b/.gitignore-example new file mode 100644 index 0000000..42e063a --- /dev/null +++ b/.gitignore-example @@ -0,0 +1,49 @@ +# Unnecessary files ignore +*.sql +*.gz +*.log +*.old + +# wp config ignore +/wp-config.php + +# wp-content uploads, backups and additional ignores +/wp-content/advanced-cache.php +/wp-content/aiowps_backups +/wp-content/backup-dup-lite +/wp-content/backupwordpress-* +/wp-content/backup* +/wp-content/cache +/wp-content/logs +/wp-content/updraft +/wp-content/wp-cache-config.php +/wp-content/webp-express +/wp-content/wp-rocket-config + +# Letsencrypt dir ignore +/.well-known + +# duplicator plugin wp-snapshots ignore +/wp-snapshots +/dup*.txt + +# webmasters confirmation files +/yandex*.html +/google*.html + +# IDE ignores +/.idea + +# composer root vendor dir ignore +/vendor + +# Apache htaccess ignore for resolve test/prod envs +/.htaccess + +# Custom ignores +/*.txt +/serap* +/wp-content/gallery +/antibot8 +/.tmb +/wp-config.bak.php diff --git a/nerest-quick.sh b/nerest-quick.sh new file mode 100755 index 0000000..8859ee5 --- /dev/null +++ b/nerest-quick.sh @@ -0,0 +1,13 @@ +#!/bin/bash +QUICK_DIR=quick + +if [[ ! -d $QUICK_DIR ]]; then + echo "Quick dir not exists: ${QUICK_DIR}" + exit 1 +fi + +cd $QUICK_DIR + +find ./ -name "*.sh.example" -exec sh -c 'F={}; cp -u $F ${F%.example}' \; + +find ./ -name "*.sh" -exec sh -c 'F={}; chmod +x ${F}' \; diff --git a/quick/.gitignore b/quick/.gitignore new file mode 100644 index 0000000..c97f963 --- /dev/null +++ b/quick/.gitignore @@ -0,0 +1 @@ +*.sh diff --git a/quick/create-config.sh.example b/quick/create-config.sh.example new file mode 100644 index 0000000..bde6a27 --- /dev/null +++ b/quick/create-config.sh.example @@ -0,0 +1,25 @@ +#!/bin/bash +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" + +. "${SCRIPT_DIR}/settings.sh" || { + echo "no settings" && exit 1 +} + +wp core config --dbname=$PROJECT_NAME --dbuser=$PROJECT_NAME --dbpass=$PROJECT_NAME --dbhost=db --dbprefix=$TABLE_PREFIX + +sed -i 's/ /tmp/out && mv /tmp/out "${PROJECT_WEB_ROOT}/wp-config.php" +