Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow running run-ab-platform.sh in detached mode #26583

Merged
merged 2 commits into from
May 31, 2023
Merged

allow running run-ab-platform.sh in detached mode #26583

merged 2 commits into from
May 31, 2023

Conversation

cpdeethree
Copy link
Contributor

What

Sometimes end users might want to simply start the docker compose process and not retain an open terminal process. This allows them to do that in a single command in the script

How

Add a flag, -b, that allows end users to run in "background" mode. Unfortunately -d was already taken so we use -b instead.

Recommended reading order

  1. run-ab-platform.sh

馃毃 User Impact 馃毃

No breaking changes

Comment on lines +111 to +113
-b | --background)
dockerDetachedMode="-d"
;;
Copy link
Member

Choose a reason for hiding this comment

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

@cpdeethree can we have a flag or command to stop the instance? Because today people only will the docker-compose down anyway. Having this we could update the upgrading docs and everything use the script.

Copy link
Contributor

Choose a reason for hiding this comment

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

@marcosmarxm I think any command to stop the instance would basically just wrap docker compose down. I feel like that is an acceptable command to use, since users should know that they are running docker containers via compose. run-ab-platform.sh is useful for starting the instance because it pulls the correct files/images, but it does not really add anything for stopping the instance.

@@ -155,7 +160,7 @@ done
echo
echo -e "$blue_text""Starting Docker Compose""$default_text"

docker compose up
docker compose up $dockerDetachedMode
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we need to conditionally call docker compose down on line 172, right? Currently when I run ./run-ab-platform.sh -b the containers spin up and then are immediately stopped.

Copy link
Contributor

Choose a reason for hiding this comment

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

@cpdeethree I'm no bash wizard, but I think this should do it: 19c58f5

Copy link
Contributor

@josephkmh josephkmh left a comment

Choose a reason for hiding this comment

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

@cpdeethree I pushed a commit that appears to be working, would appreciate a quick check, but otherwise LGTM! 馃殺

@josephkmh josephkmh merged commit 7ce51a2 into master May 31, 2023
19 checks passed
@josephkmh josephkmh deleted the detached branch May 31, 2023 11:37
@cpdeethree
Copy link
Contributor Author

@cpdeethree I pushed a commit that appears to be working, would appreciate a quick check, but otherwise LGTM! 馃殺

Looks good!

marcosmarxm pushed a commit to natalia-miinto/airbyte that referenced this pull request Jun 8, 2023
* allow running in detached mode

* conditionally call docker compose down

---------

Co-authored-by: josephkmh <joseph@airbyte.io>
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.

None yet

3 participants