-
Notifications
You must be signed in to change notification settings - Fork 133
/
convenience.sh
executable file
·62 lines (55 loc) · 1.55 KB
/
convenience.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
#!/bin/bash
# Function to reset the Qdrant database
reset_qdrant_database() {
echo "Resetting the Qdrant database..."
docker compose stop qdrant-database
docker compose rm -f qdrant-database
docker volume rm trieve_qdrant_data
docker compose up -d qdrant-database
diesel db reset
}
reset_s3_service() {
echo "Resetting the S3 service..."
docker compose stop s3
docker compose rm -f s3
docker volume rm vault_s3-data
docker compose up -d s3
}
start_local_services() {
echo "Starting local services..."
docker compose up -d db redis qdrant-database s3 s3-client keycloak keycloak-db tika clickhouse-db
}
build_typescript_client() {
echo "Building the TypeScript client..."
cargo run --features runtime-env --manifest-path server/Cargo.toml --bin redoc_ci > ./clients/ts-sdk/openapi.json
cd ./clients/ts-sdk/; yarn && yarn build:clean;
echo "Done building the TypeScript client."
}
start_firecrawl() {
echo "Starting Firecrawl..."
docker compose -f docker-compose-firecrawl.yml up -d firecrawl-worker firecrawl-api playwright-service redis
}
# Main script logic
while getopts ":qps3lcf" opt; do
case $opt in
q)
reset_qdrant_database
;;
3)
reset_s3_service
;;
l)
start_local_services
;;
f)
start_firecrawl
;;
c)
build_typescript_client
;;
\?)
echo "Invalid option: -$OPTARG" >&2
exit 1
;;
esac
done