-
Notifications
You must be signed in to change notification settings - Fork 0
/
install-self-hosted-docker.sh
81 lines (45 loc) · 1.45 KB
/
install-self-hosted-docker.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
#!/bin/bash
echo "Starting Recogito Studio Install"
# Clone the client
echo "Cloning recogito-client"
git clone --depth 1 https://github.com/recogito/recogito-client.git
# Remove the default client config
rm -f ./recogito-client/src/config.json
# Copy the custom config
cp ./docker/config/config.json ./recogito-client/src/config.json
# Build the client
cd ./recogito-client
echo "Building Client docker container"
rm .env
cp ../docker/.env .env
# Load ENV vars
set -o allexport
source ./.env
set +o allexport
docker build --no-cache -t recogito-studio-client:latest .
# Start docker
echo "Starting Supabase"
cd ../docker
docker compose -f ./docker-compose.yml -f ./docker-compose.client.yml pull
docker compose -f ./docker-compose.yml -f ./docker-compose.client.yml up -d
cd ..
# Clone the server src
echo "Cloning recogito-server"
git clone --depth 1 https://github.com/recogito/recogito-server.git
# Add supabase
npm i supabase --save-dev
# Remove the default server config
rm -f ./recogito-server/config.json
# Copy the custom config
cp ./docker/config/config.json ./recogito-server/config.json
cd ./recogito-server
npm install
npx supabase db push --db-url postgresql://postgres:$POSTGRES_PASSWORD@localhost:$POSTGRES_PORT/postgres
sleep 5
node ./create-default-groups.js -f ./config.json
# Remove the client and server repos
echo "Removing repositories"
cd ..
rm -rf ./recogito-client/
rm -rf ./recogito-server/
echo "Recogito Studio Installed!"