Skip to content

Commit

Permalink
chore: support flag file _control/debug (#38)
Browse files Browse the repository at this point in the history
This will allow, for example, .htaccess directives based on the
existence of the _control/debug file, so we know if we have built in
debug mode or not, for example:

<IfFile /var/www/html/_control/debug>
 ... add extra logging
</IfFile>

_control/debug should be added to .gitignore on all sites
  • Loading branch information
mcdurdin authored Nov 1, 2024
1 parent be65085 commit c2dd18a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions _common/docker.inc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,12 @@ function start_docker_container() {

_verify_vendor_is_not_folder

if [ $BUILDER_CONFIGURATION =~ debug ]; then
touch _control/debug
else
rm -f _control/debug
fi

local CONTAINER_ID=$(get_docker_container_id $CONTAINER_NAME)
if [ ! -z "$CONTAINER_ID" ]; then
builder_die "$HOST container $CONTAINER_ID has already been started"
Expand Down

0 comments on commit c2dd18a

Please sign in to comment.