-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeploy.sh
More file actions
executable file
·56 lines (47 loc) · 1.32 KB
/
deploy.sh
File metadata and controls
executable file
·56 lines (47 loc) · 1.32 KB
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
#!/bin/bash
cd "$(dirname "${BASH_SOURCE[0]}")"
#
# Check there is a license file for the Curity Identity Server
#
if [ ! -f './license.json' ]; then
echo 'Please provide a license file in the root folder before deploying the system'
exit 1
fi
#
# If required, get an ngrok URL for testing with OAuth tools
#
RUNTIME_BASE_URL='http://localhost:8443'
if [ "$USE_NGROK" == 'true' ]; then
if [ "$(pgrep ngrok)" == '' ]; then
ngrok http 8443 --log=stdout &
sleep 5
fi
RUNTIME_BASE_URL=$(curl -s http://localhost:4040/api/tunnels | jq -r '.tunnels[] | select(.proto == "https") | .public_url')
if [ "$RUNTIME_BASE_URL" == "" ]; then
echo 'Problem encountered getting an NGROK URL'
exit 1
fi
fi
export RUNTIME_BASE_URL
echo "The OpenID Connect Metadata URL is at: $RUNTIME_BASE_URL/oauth/v2/oauth-anonymous/.well-known/openid-configuration"
#
# This is used by Curity developers to prevent checkins of license files
#
cp ./hooks/pre-commit ./.git/hooks
#
# Force a teardown of postgres data so that on each install users must be created
#
rm -rf data
mkdir data
#
# Deploy the system
#
docker compose --project-name accountlinking up --force-recreate --detach
if [ $? -ne 0 ]; then
echo 'Problem encountered starting deployment'
exit 1
fi
#
# View logs in a child terminal window
#
open -a Terminal ./logs.sh