#!/usr/bin/env bash
set -euo pipefail

cd "$(dirname "$0")/.."
source deploy/env.sh

export K8S_NAMESPACE="${TEST_NAMESPACE}"
export APP_HOST="${TEST_HOST}"
export API_HOST="${TEST_API_HOST:-$TEST_HOST}"
export NEXT_PUBLIC_SITE_URL="https://${APP_HOST}"
export NEXT_PUBLIC_API_BASE="https://${API_HOST}/api"
export APP_ENV="testing"
export CLUSTER_ISSUER="${TEST_CLUSTER_ISSUER}"
export INGRESS_CLASS
export APP_REPLICAS="${APP_REPLICAS:-1}"

# optionally set AUTH_SECRET and DATABASE_URL (pointing to lomavuokraus_testing) in the environment before running
bash deploy/deploy.sh
