unoverse 0.1.136 → 0.1.138
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/operator/lib/setup.sh +25 -10
- package/package.json +1 -1
package/operator/lib/setup.sh
CHANGED
|
@@ -200,20 +200,26 @@ cmd_setup() {
|
|
|
200
200
|
read -p " REDIS_TLS [$rd]: " REDIS_TLS
|
|
201
201
|
REDIS_TLS="${REDIS_TLS:-$rd}"
|
|
202
202
|
|
|
203
|
-
#
|
|
204
|
-
#
|
|
205
|
-
#
|
|
203
|
+
# BRING YOUR OWN, or take the one the deploy makes. The question used to be "do you have
|
|
204
|
+
# an identity provider (Auth0/OIDC) to connect?", which reads as a requirement a
|
|
205
|
+
# developer must go and satisfy. It is not one: AWS provisions a Cognito user pool and
|
|
206
|
+
# writes AUTH_ISSUER, AUTH_CLIENT_ID and AUTH_AUDIENCE into .env.production itself
|
|
207
|
+
# (infra/aws/outputs.tf). Only DigitalOcean needs an issuer from you, and only at deploy
|
|
208
|
+
# time (deploy.sh _ensure_ground_config), where it asks.
|
|
206
209
|
#
|
|
207
|
-
#
|
|
208
|
-
#
|
|
209
|
-
#
|
|
210
|
-
#
|
|
210
|
+
# So the honest question is whether you are bringing one, and the default is no.
|
|
211
|
+
#
|
|
212
|
+
# Answering either way is a LOCAL switch only. INFRASTRUCTURE.md is explicit that there
|
|
213
|
+
# is no auth-off deployment, and the platform enforces that rather than trusting this
|
|
214
|
+
# wizard: authConfig.ts refuses to start with auth off when NODE_ENV=production.
|
|
211
215
|
pull_status_line
|
|
212
216
|
local cur_auth idp_prompt
|
|
213
217
|
cur_auth=$(_env_cur AUTH_ENABLED)
|
|
214
218
|
idp_prompt="[y/N]"
|
|
215
219
|
[ "$cur_auth" = "true" ] && idp_prompt="[Y/n]"
|
|
216
|
-
|
|
220
|
+
echo ""
|
|
221
|
+
info "Sign-in: deploying provides one. ${DIM}AWS creates a Cognito user pool; DigitalOcean asks for an issuer then${NC}"
|
|
222
|
+
read -r -p " Are you bringing your own (Auth0/OIDC)? $idp_prompt " HAS_IDP
|
|
217
223
|
echo ""
|
|
218
224
|
if [ -z "$HAS_IDP" ] && [ "$cur_auth" = "true" ]; then HAS_IDP=y; fi
|
|
219
225
|
|
|
@@ -253,15 +259,16 @@ cmd_setup() {
|
|
|
253
259
|
cur_aud="${cur_aud:-gravity-api}"
|
|
254
260
|
read -p " AUTH_AUDIENCE [$cur_aud]: " AUTH_AUDIENCE
|
|
255
261
|
AUTH_AUDIENCE="${AUTH_AUDIENCE:-$cur_aud}"
|
|
262
|
+
ok "Your provider will be used, here and when you deploy"
|
|
256
263
|
else
|
|
257
264
|
AUTH_ENABLED=false
|
|
258
265
|
AUTH_ISSUER=""
|
|
259
266
|
AUTH_CLIENT_ID=""
|
|
260
267
|
AUTH_AUDIENCE="gravity-api"
|
|
261
|
-
|
|
262
|
-
info "Deploying needs it: ${BOLD}unoverse deploy${NC} runs with auth on, and the server refuses to start without it in production"
|
|
268
|
+
info "No sign-in locally. The deploy makes one when you ship this universe"
|
|
263
269
|
fi
|
|
264
270
|
|
|
271
|
+
|
|
265
272
|
# NOT ASKED. 4105 is the port docker-compose publishes, so locally this is a fact the
|
|
266
273
|
# CLI already knows, and confirming it is not a question. A DEPLOYED universe gets its
|
|
267
274
|
# own API_URL rendered into .env.production by Terraform, which never comes through here.
|
|
@@ -313,6 +320,11 @@ cmd_setup() {
|
|
|
313
320
|
# Write .env
|
|
314
321
|
cat > "$ROOT/.env" << ENVEOF
|
|
315
322
|
# Written by unoverse create
|
|
323
|
+
# LOCAL DEVELOPMENT, and it goes WITH AUTH_ENABLED below. Unset means production, where
|
|
324
|
+
# auth-off is refused (authConfig.ts:63) and docker-compose.yml defaults NODE_ENV to
|
|
325
|
+
# production — so omitting this line left a local universe that could not boot. A deployed
|
|
326
|
+
# universe sets neither: Terraform renders .env.production with auth on.
|
|
327
|
+
NODE_ENV=development
|
|
316
328
|
DOCR_TOKEN=${DOCR_TOKEN}
|
|
317
329
|
DOCR_USER=${DOCR_USER:-${DOCR_TOKEN}}
|
|
318
330
|
DATABASE_URL=${DATABASE_URL}
|
|
@@ -331,6 +343,9 @@ OPENAI_API_KEY=${OPENAI_API_KEY}
|
|
|
331
343
|
# back it up with the database. Kept on re-runs.
|
|
332
344
|
CREDENTIAL_ENCRYPTION_KEY=${CREDENTIAL_ENCRYPTION_KEY}
|
|
333
345
|
HYPERBROWSER_API_KEY=${HYPERBROWSER_API_KEY}
|
|
346
|
+
# Marketplace catalogue to install from (docs/architecture/MARKETPLACE.md).
|
|
347
|
+
# Empty = local items only. No default: a URL is never hardcoded.
|
|
348
|
+
UNOVERSE_MARKETPLACE_URL=
|
|
334
349
|
DOMAIN=
|
|
335
350
|
ENVEOF
|
|
336
351
|
|
package/package.json
CHANGED