All checks were successful
Queue Release Build / prepare (push) Successful in 20s
Deploy Web Apps / deploy (push) Successful in 9m11s
Queue Release Build / build-windows (push) Successful in 28m8s
Queue Release Build / build-linux (push) Successful in 46m49s
Queue Release Build / build-android (push) Successful in 20m54s
Queue Release Build / finalize (push) Successful in 2m15s
38 lines
1.1 KiB
Bash
Executable File
38 lines
1.1 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# Launch the full dev stack, respecting SSL= from .env
|
|
set -e
|
|
|
|
DIR="$(cd "$(dirname "$0")" && pwd)"
|
|
|
|
# Load .env
|
|
if [ -f "$DIR/.env" ]; then
|
|
set -a
|
|
source "$DIR/.env"
|
|
set +a
|
|
fi
|
|
|
|
SSL="${SSL:-false}"
|
|
|
|
if [ "$SSL" = "true" ]; then
|
|
# Ensure certs exist
|
|
if [ ! -f "$DIR/.certs/localhost.crt" ]; then
|
|
echo "SSL=true but no certs found. Generating..."
|
|
"$DIR/generate-cert.sh"
|
|
fi
|
|
|
|
NG_SERVE="cd toju-app && npx ng serve --host=0.0.0.0 --ssl --ssl-cert=../.certs/localhost.crt --ssl-key=../.certs/localhost.key"
|
|
# Use 127.0.0.1 so wait-on does not hit a stale HTTP listener on localhost (::1).
|
|
WAIT_URL="https://127.0.0.1:4200"
|
|
HEALTH_URL="https://127.0.0.1:3001/api/health"
|
|
export NODE_TLS_REJECT_UNAUTHORIZED=0
|
|
else
|
|
NG_SERVE="cd toju-app && npx ng serve --host=0.0.0.0"
|
|
WAIT_URL="http://127.0.0.1:4200"
|
|
HEALTH_URL="http://127.0.0.1:3001/api/health"
|
|
fi
|
|
|
|
exec npx concurrently --kill-others \
|
|
"cd server && npm run dev" \
|
|
"$NG_SERVE" \
|
|
"wait-on $WAIT_URL $HEALTH_URL && cross-env NODE_ENV=development SSL=$SSL node tools/launch-electron.js . --no-sandbox --disable-dev-shm-usage"
|