#!/usr/bin/env bash
# shellcheck disable=SC2188

<<COMMENT
So this script handles some shared state between the things we need to do to run local Docker
and the things we need to do to run EKS docker

Called By: Both of those scripts and never once a human being
COMMENT

set -euo pipefail

export PALOLO_ENV=${PALOLO_ENV:-docker}

# Create the .env file and env.json file with all our secrets for this environment.
# This will also patch the client configuration (public "secrets") into the bundle.
time pnpm run --dir=packages/server secrets "${PALOLO_ENV?}" --deploy
