Skip to content

GemStack 0.4.1

Choose a tag to compare

@github-actions github-actions released this 06 Oct 12:23
· 16 commits to main since this release
  • One .env for the API and the frontend: the root one. frontend/lib/gemstack/root-env.cjs loads the
    root .env files for Next.js (same order as the API, real environment first): next.config.ts requires
    it, so next dev, next build and next start get the values wherever they run, and the standalone
    server preloads it (npm run start:standalone, i.e.
    node -r ./lib/gemstack/root-env.cjs .next/standalone/server.js). Before, a production build outside
    gemstack dev compiled NEXT_PUBLIC_* values in as undefined, and the standalone server's server-side
    code only saw real environment variables. The API now loads the root .env files in production too, when
    present (real environment variables still win). The Docker image built by gemstack generate deploy gets
    the root .env's NEXT_PUBLIC_* lines as a build secret for next build (.kamal/secrets:
    GEMSTACK_PUBLIC_ENV), never stored in the image, and its web command preloads the loader too. Existing
    apps: gemstack update adds the loader and updates next.config.ts and package.json; re-run
    gemstack generate deploy for the Docker/Kamal part.