Skip to content

Allow to run setup scripts synchronously - #102

Open
vedmaka wants to merge 1 commit into
masterfrom
feature/fast-boot
Open

Allow to run setup scripts synchronously#102
vedmaka wants to merge 1 commit into
masterfrom
feature/fast-boot

Conversation

@vedmaka

@vedmaka vedmaka commented Aug 27, 2023

Copy link
Copy Markdown
Member

Adds new FAST_BOOT env. variable (enabled by default), if set to 0 will ensure all the setup and maintenance scripts are completed before starting Apache web server

Adds new `FAST_BOOT` env. variable (enabled by default), if set to `0` will ensure all the setup and maintenance scripts are completed before starting Apache web server
@github-actions

Copy link
Copy Markdown

🐳 The image based on 187dcb94 commit has been built with 1.39.2-20230827-102 tag as ghcr.io/wikiteq/taqasta:1.39.2-20230827-102

# 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants