Skip to content

Commit

Permalink
feat(wordpress): add SKIP_FIX_PERMISSIONS
Browse files Browse the repository at this point in the history
  • Loading branch information
AliMD committed Aug 15, 2022
1 parent d1ed858 commit 79ab5d2
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/lab/wordpress/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ PHP_VERSION=8.1
WORDPRESS_VERSION=6.0
NGINX_MEMOTY_LIMIT=256m
PHP_MEMOTY_LIMIT=2048m
## Remove _data/wp-config.php to appy
WORDPRESS_DB_HOST=mariadb_database_1.alwatr-private-network
WORDPRESS_DB_USER=alwatr
WORDPRESS_DB_PASSWORD=secret-password
WORDPRESS_DB_NAME=database
WORDPRESS_TABLE_PREFIX=wp_
WORDPRESS_DEBUG=
SKIP_FIX_PERMISSIONS=
2 changes: 1 addition & 1 deletion packages/lab/wordpress/_up.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ time docker-compose build --pull

echoStep "Starting..."

time docker-compose up --detach --remove-orphans # --force-recreate
time docker-compose up --detach --remove-orphans --force-recreate

echoStep "Fix permitions..."

Expand Down
7 changes: 6 additions & 1 deletion packages/lab/wordpress/php/fix-permition.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,15 @@
set -Eeuo pipefail
trap "echo '❌ Error'" ERR

data=/var/www/html/
if [ ! -z "${SKIP_FIX_PERMISSIONS:-}" ]
then
echo "Skip fix permitions"
exit 0
fi

echo "Fix permitions..."

data=/var/www/html/
ls -lahF $data
chown www-data:www-data -R $data
find $data -type d -exec chmod 755 {} \;
Expand Down

0 comments on commit 79ab5d2

Please sign in to comment.