-
Notifications
You must be signed in to change notification settings - Fork 55
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
Make CLI wait for init to complete #225
Changes from 5 commits
6f7b8f6
77a3cbf
4ff6c5f
d209985
37041a5
8db4724
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,15 +19,14 @@ email_prompt() { | |
} | ||
|
||
function setDefaults() { | ||
detach="" | ||
: | ||
} | ||
|
||
function parseFlags() { | ||
while (($#)); do | ||
case "$1" in | ||
--run-cli) | ||
run_cli=1 | ||
detach="--detach" | ||
shift 1 ;; | ||
*) | ||
echo "Unrecognized arg: $1" | ||
|
@@ -55,17 +54,22 @@ main() { | |
# Ensure we're using the latest faros-init image | ||
export FAROS_INIT_IMAGE=farosai.docker.scarf.sh/farosai/faros-ce-init:latest | ||
|
||
docker-compose pull faros-init | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @ypc-faros can you confirm removing that is ok? I don't know why it was in in the first place. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sorry I missed this. We actually need it to make sure we pull the latest faros init image. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
|
||
if [[ $(uname -m 2> /dev/null) == 'arm64' ]]; then | ||
# Use Metabase images built for Apple M1 | ||
METABASE_IMAGE="farosai.docker.scarf.sh/farosai/metabase-m1" \ | ||
docker-compose up --build --remove-orphans $detach | ||
docker compose up --build --remove-orphans --detach && docker compose logs --follow faros-init | ||
else | ||
docker-compose up --build --remove-orphans $detach | ||
docker compose up --build --remove-orphans --detach && docker compose logs --follow faros-init | ||
fi | ||
|
||
if ((run_cli)); then | ||
CONTAINER_EXIT_CODE=$(docker wait faros-community-edition-faros-init-1) | ||
if [ "$CONTAINER_EXIT_CODE" != 0 ]; then | ||
printf "An error occured during the initialization of Faros CE.\n" | ||
printf "For troubleshooting help, you can bring this log on our Slack workspace:\n" | ||
printf "https://community.faros.ai/docs/slack \n" | ||
exit 1 | ||
fi | ||
docker pull farosai/faros-ce-cli:latest | ||
AIRBYTE_URL=$(grep "^WEBAPP_URL" .env| sed 's/^WEBAPP_URL=//') | ||
METABASE_PORT=$(grep "^METABASE_PORT" .env| sed 's/^METABASE_PORT=//') | ||
|
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.
Lets delete this unused function