Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -1025,7 +1025,8 @@ ENV MW_AUTOUPDATE=true \
MEDIAWIKI_MAINTENANCE_AUTO_ENABLED=false \
MW_DEBUG_MODE=false \
MW_SENTRY_DSN="" \
MW_USE_CACHE_DIRECTORY=1
MW_USE_CACHE_DIRECTORY=1 \
FAST_BOOT=1

COPY _sources/configs/msmtprc /etc/
COPY _sources/configs/mediawiki.conf /etc/apache2/sites-enabled/
Expand Down
12 changes: 10 additions & 2 deletions _sources/scripts/run-apache.sh
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,19 @@ make_dir_writable "$MW_VOLUME" -not '(' -path "$MW_VOLUME/images" -prune ')'

# Check and update permissions of wiki images in background.
# It can take a long time and should not block Apache from starting.
/update-images-permissions.sh &
if isTrue "$FAST_BOOT"; then

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So overall this makes sense, but I suggest inverting the logic, since the default is that we want to boot fast - and also the name could be a bit clearer. Suggest something like

if isTrue "$SYNCHRONOUS_SCRIPTS"; then
    /update-images-permissions.sh
else
    /update-images-permissions.sh &
fi

and then having the default of SYNCHRONOUS_SCRIPTS be 0 instead of 1.

We should also update the comments to say that normally we shouldn't block Apache, but it can be configured to do so

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good points, thanks

/update-images-permissions.sh &
else
/update-images-permissions.sh
fi

# Run maintenance scripts in background.
touch "$WWW_ROOT/.maintenance"
/run-maintenance-scripts.sh &
if isTrue "$FAST_BOOT"; then
/run-maintenance-scripts.sh &
else
/run-maintenance-scripts.sh
fi

############### Run Apache ###############
# Make sure we're not confused by old, incompletely-shutdown Apache
Expand Down