-
Notifications
You must be signed in to change notification settings - Fork 79
Expand file tree
/
Copy pathstart.sh
More file actions
executable file
·29 lines (25 loc) · 1.02 KB
/
start.sh
File metadata and controls
executable file
·29 lines (25 loc) · 1.02 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
#!/bin/bash
HASURA_FOLDER=/app
cd $HASURA_FOLDER || {
echo "Hasura folder '$HASURA_FOLDER' not found"
exit 1
}
# Workaround for https://github.com/hasura/graphql-engine/issues/2824#issuecomment-801293056
socat TCP-LISTEN:8080,fork TCP:graphql-engine:8080 &
socat TCP-LISTEN:9695,fork,reuseaddr,bind=console TCP:127.0.0.1:9695 &
socat TCP-LISTEN:9693,fork,reuseaddr,bind=console TCP:127.0.0.1:9693 &
{
# Skip migrations for safetrust since it will be created during tenant deployment
echo "Skipping migrations for safetrust database as it will be created during tenant deployment"
# Apply only metadata changes
echo "Applying metadata from metadata/base..."
hasura metadata apply --metadata-dir metadata/base --skip-update-check
# Run console if specified
if [[ -v HASURA_RUN_CONSOLE ]]; then
echo "Starting console..."
hasura console --log-level DEBUG --address "127.0.0.1" --no-browser || exit 1
else
echo "Started without console"
tail -f /dev/null
fi
}