Update local emulator environment handling and documentation

- Modified the local emulator scripts to replace references from `.env.development` to `base.env`, ensuring consistency in environment variable sourcing.
- Updated the QEMU runtime path in the documentation to clarify the cause of a regression in the local emulator's startup time.
- Enhanced the `.dockerignore` file to exclude new emulator-related files, improving build efficiency.

These changes streamline the local emulator setup and improve clarity in documentation regarding environment configurations.
This commit is contained in:
mantrakp04 2026-03-19 21:57:41 -07:00
parent ad2db193b6
commit a233e64b8e
4 changed files with 8 additions and 4 deletions

View File

@ -61,6 +61,8 @@ dist
.docusaurus
.cache-loader
**.tsbuildinfo
docker/local-emulator/qemu/images
docker/local-emulator/qemu/run
.xata*
@ -149,4 +151,3 @@ packages/stack/*
!packages/react/package.json
!packages/next/package.json
!packages/stack/package.json

View File

@ -99,3 +99,6 @@ A: Update affected inline snapshots in `apps/e2e/tests/backend/endpoints/api/v1/
Q: How should `createOrUpdateProjectWithLegacyConfig` handle `onboardingStatus` for forward-compat checks?
A: Only write `onboardingStatus` when the `Project.onboardingStatus` column exists (for example by checking `information_schema.columns` in-transaction) so current code can still run against older schemas where that column is absent.
Q: What caused the March 19, 2026 QEMU local emulator deps startup regression?
A: The QEMU runtime path regressed when it switched from mounting `docker/local-emulator/base.env` into the runtime ISO to mounting the generated hidden file `docker/local-emulator/.env.development` instead. In testing, the `.env.development` QEMU path left cold boot stuck with only PostgreSQL healthy, while restoring the runtime ISO back to `base.env` brought deps startup back to about 12-13 seconds. The env payloads were effectively the same, so the likely issue was the QEMU runtime bundle/path handling for `.env.development`, not the actual env values.

View File

@ -55,7 +55,7 @@ write_files:
set -a
source /mnt/stack-runtime/runtime.env
source /mnt/stack-runtime/.env.development
source /mnt/stack-runtime/base.env
set +a
# Container-local dependencies run on localhost. Host-only development
@ -67,7 +67,7 @@ write_files:
{
# Static vars from base config and runtime (e.g. API keys, feature flags)
cat /mnt/stack-runtime/.env.development
cat /mnt/stack-runtime/base.env
cat /mnt/stack-runtime/runtime.env
# Computed vars — depend on port prefix or deps host

View File

@ -79,7 +79,7 @@ prepare_runtime_config_iso() {
{
printf "STACK_EMULATOR_PORT_PREFIX=%s\n" "$PORT_PREFIX"
} > "$cfg_dir/runtime.env"
cp "$SCRIPT_DIR/../.env.development" "$cfg_dir/.env.development"
cp "$SCRIPT_DIR/../.env.development" "$cfg_dir/base.env"
make_iso_from_dir "$cfg_iso" "STACKCFG" "$cfg_dir"
}