-
Notifications
You must be signed in to change notification settings - Fork 0
/
provision.sh
executable file
·51 lines (37 loc) · 983 Bytes
/
provision.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
43
44
45
46
47
48
49
50
51
#!/bin/bash
set -e
if [ ! -d ./receevi ]; then
git clone https://github.com/receevi/receevi
fi
pushd receevi
git pull
popd
if [ ! -f ./.env ]; then
cp ./receevi/.env.example ./.env
fi
./setup-python.sh
source .venv/bin/activate
python initialize-variables.py
./supabase.sh
cp .env ./receevi/.env
pushd receevi
docker build -t receevi .
popd
source supabase/docker/.env
python setup-main-compose.py
docker compose up -d
# supabase db push --db-url "postgres://user:[email protected]:5432/postgres"
if ! command -v supabase &> /dev/null
then
mkdir -p tmp
pushd tmp
curl -L -o supabase_1.175.0_linux_amd64.deb https://github.com/supabase/cli/releases/download/v1.175.0/supabase_1.175.0_linux_amd64.deb
sudo dpkg -i supabase_1.175.0_linux_amd64.deb
popd
fi
echo "Sleeping for 10 seconds..."
sleep 10
pushd receevi
yes | supabase db push --db-url "postgres://postgres:[email protected]:5432/$POSTGRES_DB"
# supabase functions deploy
popd