Loading data/nginx/server.conf +5 −0 Original line number Diff line number Diff line Loading @@ -120,4 +120,9 @@ server { include safe.types; default_type application/octet-stream; } # Disable serving directly from any page cache in /wp-content/cache location /wp-content/cache/ { return 404; } } scripts/entrypoint.sh +14 −11 Original line number Diff line number Diff line Loading @@ -167,24 +167,26 @@ setup_components() { return 0 } get_media_dir() get_writable_dirs() { [[ -v MEDIA ]] && return MEDIA=$( [[ -v MEDIA && -v CACHE ]] && return local content=$( wp config get WP_CONTENT_DIR --type=constant || echo wp-content ) local media=$( wp config get UPLOADS --type=constant || wp option get upload_path ) [[ -n "${MEDIA}" ]] && return local _wp_content=$(wp config get WP_CONTENT_DIR --type=constant) MEDIA=${_wp_content:-wp-content}/uploads MEDIA=${media:-${content}/uploads} CACHE=${content}/cache } setup_media() setup_writable() { # UID values change on every run, ensure the owner and group are set # correctly on the media directory/volume. get_media_dir chown -R ${WORKER_USER}:${WORKER_USER} "${MEDIA}" get_writable_dirs chown -R ${WORKER_USER}:${WORKER_USER} "${MEDIA}" "${CACHE}" } setup_sandbox() Loading Loading @@ -233,7 +235,7 @@ setup_debug() collect_static() { get_media_dir get_writable_dirs local IFS=, declare -a flags=(flist stats remove del) test -t 1 && flags+=(progress2) Loading @@ -244,6 +246,7 @@ collect_static() --exclude-from=- \ --exclude='*.php' \ --exclude="${MEDIA}" \ --exclude="${CACHE}" \ --exclude=/static/ \ --exclude=/vendor/ \ --force \ Loading Loading @@ -349,7 +352,7 @@ case "$1" in create_config setup_components setup_debug setup_media setup_writable collect_static generate_static setup_sandbox Loading Loading
data/nginx/server.conf +5 −0 Original line number Diff line number Diff line Loading @@ -120,4 +120,9 @@ server { include safe.types; default_type application/octet-stream; } # Disable serving directly from any page cache in /wp-content/cache location /wp-content/cache/ { return 404; } }
scripts/entrypoint.sh +14 −11 Original line number Diff line number Diff line Loading @@ -167,24 +167,26 @@ setup_components() { return 0 } get_media_dir() get_writable_dirs() { [[ -v MEDIA ]] && return MEDIA=$( [[ -v MEDIA && -v CACHE ]] && return local content=$( wp config get WP_CONTENT_DIR --type=constant || echo wp-content ) local media=$( wp config get UPLOADS --type=constant || wp option get upload_path ) [[ -n "${MEDIA}" ]] && return local _wp_content=$(wp config get WP_CONTENT_DIR --type=constant) MEDIA=${_wp_content:-wp-content}/uploads MEDIA=${media:-${content}/uploads} CACHE=${content}/cache } setup_media() setup_writable() { # UID values change on every run, ensure the owner and group are set # correctly on the media directory/volume. get_media_dir chown -R ${WORKER_USER}:${WORKER_USER} "${MEDIA}" get_writable_dirs chown -R ${WORKER_USER}:${WORKER_USER} "${MEDIA}" "${CACHE}" } setup_sandbox() Loading Loading @@ -233,7 +235,7 @@ setup_debug() collect_static() { get_media_dir get_writable_dirs local IFS=, declare -a flags=(flist stats remove del) test -t 1 && flags+=(progress2) Loading @@ -244,6 +246,7 @@ collect_static() --exclude-from=- \ --exclude='*.php' \ --exclude="${MEDIA}" \ --exclude="${CACHE}" \ --exclude=/static/ \ --exclude=/vendor/ \ --force \ Loading Loading @@ -349,7 +352,7 @@ case "$1" in create_config setup_components setup_debug setup_media setup_writable collect_static generate_static setup_sandbox Loading