forked from faros-ai/faros-community-edition
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstart.sh
executable file
·43 lines (36 loc) · 1.08 KB
/
start.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/bin/bash
email_prompt() {
read -p "Please provide us with your email address: " EMAIL
while true; do
if [ -z "$EMAIL" ]
then
break
fi
read -p "Is this email correct? $EMAIL - [y/n]: " yn
case $yn in
[Yy]*) break ;;
[Nn]*) email_prompt; exit 1 ;;
esac
done
printf "Thank you! 🙏\n"
}
EMAIL_FILE=".faros-email"
if [[ -f "$EMAIL_FILE" ]]; then
EMAIL=$(cat $EMAIL_FILE)
else
printf "Hello 👋 Welcome to Faros Community Edition! 🤗\n\n"
printf "Want to stay up to date with the latest community news? (we won't spam you)\n"
email_prompt
echo "$EMAIL" > $EMAIL_FILE
fi
export FAROS_EMAIL=$EMAIL
# 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
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
else
docker-compose up --build --remove-orphans
fi