-
-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added ability for custom startup script #55
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please write necessary test cases. This use case is not that easy to solve.
I don't think anything below the exec
statements will get executed. As such, extra provisioning can only happen before supervisord
loads and starts other services. Post start provisioning can then only happen via fin exec
outside of cli
. Unless there is some delayed service or cron job that gets triggered once the container enters a healthy state (see healthcheck.sh
).
Yea, we need to execute the script before |
5.6/startup.sh
Outdated
echo-debug "Running Custom Startup Script..." | ||
${PROJECT_ROOT}/.docksal/services/cli/startup.sh | ||
echo-debug "Custom Startup Script Complete..." | ||
fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
duplication
tests/test.bats
Outdated
run fin exec -T 'cat /tmp/test-startup.txt' | ||
[[ ${status} == 0 ]] && | ||
[[ "${output}" == "I ran properly" ]] | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add newline
7.2/startup.sh
Outdated
@@ -89,4 +95,4 @@ else | |||
# Launch the passed command in an non-interactive bash session under docker user | |||
# $@ does not work here. $* has to be used. | |||
exec gosu docker bash -c "$DOCKSALRC; exec $*" | |||
fi | |||
fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add newline
Looks good to me |
@lmakarov please re-review when you have a moment. |
Merged. Thanks @sean-e-dietrich |
Added ability for user to add a custom startup script within the
${PROJECT_ROOT}/.docksal/services/cli/startup.sh
. This is checked within thestartup.sh
file for the independent docker containers.README.md
has also been updated to include the following changes.Solves #24