forked from code-kern-ai/refinery
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstart
executable file
·33 lines (23 loc) · 1.13 KB
/
start
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
#!/bin/bash
LOCAL_VOLUME=./postgres-data
unameOut="$(uname -s)"
case "${unameOut}" in
Linux*) HOST_IP=$(ip a | grep "inet " | grep -v 127.0.0.1 | head -1 | grep -o -E "[0-9]+.[0-9]+.[0-9]+.[0-9]+" | head -1);;
Darwin*) HOST_IP=$(ifconfig | grep "inet " | grep -v 127.0.0.1 | head -1 | grep -o -E "[0-9]+.[0-9]+.[0-9]+.[0-9]+" | head -1);;
esac
MINIO_ENDPOINT="http://$HOST_IP:7053"
cp refinery/template/docker-compose.yml refinery/docker-compose.yml
sed -i.bak -e "s|{MINIO_ENDPOINT}|$MINIO_ENDPOINT|g" refinery/docker-compose.yml
sed -i.bak -e "s|{VOLUME}|$LOCAL_VOLUME|g" refinery/docker-compose.yml
rm refinery/*.bak
#pull newest images
docker pull kernai/refinery-lf-exec-env:latest
docker pull kernai/refinery-ml-exec-env:latest
docker pull kernai/refinery-record-ide-env:latest
if [ ! -f "./refinery/oathkeeper/jwks.json" ]; then
docker run --rm docker.io/oryd/oathkeeper:v0.38 credentials generate --alg RS256 > refinery/oathkeeper/jwks.json
fi
docker-compose -f refinery/docker-compose.yml up -d
echo "UI: http://localhost:4455/app/"
echo "Minio: $MINIO_ENDPOINT"
echo "MailHog: http://localhost:4436/"