You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: 7.4-nginx-prod/entrypoint
+39-40Lines changed: 39 additions & 40 deletions
Original file line number
Diff line number
Diff line change
@@ -16,77 +16,76 @@ user=kool
16
16
group=kool
17
17
uid=$(id -u)
18
18
19
-
if [ "$1"="php-fpm" ] || [ "$1"="supervisord" ];then
19
+
if [ "$1"='php-fpm' ] || [ "$1"='supervisord' ];then
20
20
# Original Wordpress Entrypoint - fresh install if none exists
21
21
if [ !-e index.php ] && [ !-e wp-includes/version.php ];then
22
22
# if the directory exists and WordPress doesn't appear to be installed AND the permissions of it are root:root, let's chown it (likely a Docker-created directory)
contentPath="${contentPath#/kool/wordpress/}"# "wp-content/plugins/akismet", etc.
54
54
if [ -e"$PWD/$contentPath" ];then
55
-
echo>&2"WARNING: '$PWD/$contentPath' exists! (not copying the WordPress version)"
56
-
sourceTarArgs+=( --exclude "./$contentPath" )
55
+
echo>&2"WARNING: '$PWD/$contentPath' exists! (not copying the WordPress version)"
56
+
sourceTarArgs+=( --exclude "./$contentPath" )
57
57
fi
58
58
done
59
59
tar "${sourceTarArgs[@]}".| tar "${targetTarArgs[@]}"
60
-
chown -R "$user:$group" /app
61
60
echo>&2"Complete! WordPress has been successfully copied to $PWD"
62
61
fi
63
62
64
63
wpEnvs=( "${!WORDPRESS_@}" )
65
64
if [ !-s wp-config.php ] && [ "${#wpEnvs[@]}"-gt 0 ];then
66
-
forwpConfigDockerin \
67
-
wp-config-docker.php \
68
-
/kool/wordpress/wp-config-docker.php \
69
-
;do
70
-
if [ -s"$wpConfigDocker" ];then
71
-
echo>&2"No 'wp-config.php' found in $PWD, but 'WORDPRESS_...' variables supplied; copying '$wpConfigDocker' (${wpEnvs[*]})"
72
-
# using "awk" to replace all instances of "put your unique phrase here" with a properly unique string (for AUTH_KEY and friends to have safe defaults if they aren't specified with environment variables)
# attempt to ensure that wp-config.php is owned by the run user
84
-
# could be on a filesystem that doesn't allow chown (like some NFS setups)
85
-
chown "$user:$group" wp-config.php ||true
86
-
fi
87
-
break
88
-
fi
89
-
done
65
+
forwpConfigDockerin \
66
+
wp-config-docker.php \
67
+
/kool/wordpress/wp-config-docker.php \
68
+
;do
69
+
if [ -s"$wpConfigDocker" ];then
70
+
echo>&2"No 'wp-config.php' found in $PWD, but 'WORDPRESS_...' variables supplied; copying '$wpConfigDocker' (${wpEnvs[*]})"
71
+
# using "awk" to replace all instances of "put your unique phrase here" with a properly unique string (for AUTH_KEY and friends to have safe defaults if they aren't specified with environment variables)
Copy file name to clipboardExpand all lines: 7.4-nginx/entrypoint
+39-40Lines changed: 39 additions & 40 deletions
Original file line number
Diff line number
Diff line change
@@ -16,77 +16,76 @@ user=kool
16
16
group=kool
17
17
uid=$(id -u)
18
18
19
-
if [ "$1"="php-fpm" ] || [ "$1"="supervisord" ];then
19
+
if [ "$1"='php-fpm' ] || [ "$1"='supervisord' ];then
20
20
# Original Wordpress Entrypoint - fresh install if none exists
21
21
if [ !-e index.php ] && [ !-e wp-includes/version.php ];then
22
22
# if the directory exists and WordPress doesn't appear to be installed AND the permissions of it are root:root, let's chown it (likely a Docker-created directory)
contentPath="${contentPath#/kool/wordpress/}"# "wp-content/plugins/akismet", etc.
54
54
if [ -e"$PWD/$contentPath" ];then
55
-
echo>&2"WARNING: '$PWD/$contentPath' exists! (not copying the WordPress version)"
56
-
sourceTarArgs+=( --exclude "./$contentPath" )
55
+
echo>&2"WARNING: '$PWD/$contentPath' exists! (not copying the WordPress version)"
56
+
sourceTarArgs+=( --exclude "./$contentPath" )
57
57
fi
58
58
done
59
59
tar "${sourceTarArgs[@]}".| tar "${targetTarArgs[@]}"
60
-
chown -R "$user:$group" /app
61
60
echo>&2"Complete! WordPress has been successfully copied to $PWD"
62
61
fi
63
62
64
63
wpEnvs=( "${!WORDPRESS_@}" )
65
64
if [ !-s wp-config.php ] && [ "${#wpEnvs[@]}"-gt 0 ];then
66
-
forwpConfigDockerin \
67
-
wp-config-docker.php \
68
-
/kool/wordpress/wp-config-docker.php \
69
-
;do
70
-
if [ -s"$wpConfigDocker" ];then
71
-
echo>&2"No 'wp-config.php' found in $PWD, but 'WORDPRESS_...' variables supplied; copying '$wpConfigDocker' (${wpEnvs[*]})"
72
-
# using "awk" to replace all instances of "put your unique phrase here" with a properly unique string (for AUTH_KEY and friends to have safe defaults if they aren't specified with environment variables)
# attempt to ensure that wp-config.php is owned by the run user
84
-
# could be on a filesystem that doesn't allow chown (like some NFS setups)
85
-
chown "$user:$group" wp-config.php ||true
86
-
fi
87
-
break
88
-
fi
89
-
done
65
+
forwpConfigDockerin \
66
+
wp-config-docker.php \
67
+
/kool/wordpress/wp-config-docker.php \
68
+
;do
69
+
if [ -s"$wpConfigDocker" ];then
70
+
echo>&2"No 'wp-config.php' found in $PWD, but 'WORDPRESS_...' variables supplied; copying '$wpConfigDocker' (${wpEnvs[*]})"
71
+
# using "awk" to replace all instances of "put your unique phrase here" with a properly unique string (for AUTH_KEY and friends to have safe defaults if they aren't specified with environment variables)
0 commit comments