Added ability for custom startup script#55
Merged
Conversation
lmakarov
requested changes
Jun 11, 2018
lmakarov
left a comment
Member
There was a problem hiding this comment.
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).
Member
|
Yea, we need to execute the script before |
achekulaev
reviewed
Jun 12, 2018
| echo-debug "Running Custom Startup Script..." | ||
| ${PROJECT_ROOT}/.docksal/services/cli/startup.sh | ||
| echo-debug "Custom Startup Script Complete..." | ||
| fi No newline at end of file |
achekulaev
reviewed
Jun 12, 2018
| run fin exec -T 'cat /tmp/test-startup.txt' | ||
| [[ ${status} == 0 ]] && | ||
| [[ "${output}" == "I ran properly" ]] | ||
| } No newline at end of file |
achekulaev
reviewed
Jun 12, 2018
| # $@ does not work here. $* has to be used. | ||
| exec gosu docker bash -c "$DOCKSALRC; exec $*" | ||
| fi | ||
| fi No newline at end of file |
achekulaev
approved these changes
Jun 13, 2018
Member
|
Looks good to me |
Member
Author
|
@lmakarov please re-review when you have a moment. |
lmakarov
approved these changes
Jun 28, 2018
Member
|
Merged. Thanks @sean-e-dietrich |
Closed
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added ability for user to add a custom startup script within the
${PROJECT_ROOT}/.docksal/services/cli/startup.sh. This is checked within thestartup.shfile for the independent docker containers.README.mdhas also been updated to include the following changes.Solves #24