Docker & Render
Deploy the single-image build.
Docker
The Dockerfile builds the admin and the default storefront into one Node 24 image with Caddy.
docker build -t shopnex .
docker run -p 3000:3000 \
-e DATABASE_URL=postgres://… \
-e APP_URL=https://shop.example.com \
-v shopnex-data:/data \
shopnexThe image generates BETTER_AUTH_SECRET into /data if you don't set one, so keep that volume.
On start, deploy/start.sh:
- requires
DATABASE_URL, generatesBETTER_AUTH_SECRETif unset, and defaultsBETTER_AUTH_URLtoAPP_URL; - runs
pnpm db:migrate; - starts the admin (port 3001), the storefront (port 4321) and Caddy on
$PORT(default 3000).
If any process exits, the container exits so your platform restarts it.
Render
render.yaml is a Render Blueprint: a Docker web service on the v2 branch with a managed Postgres database, a generated BETTER_AUTH_SECRET, and TENANCY_MODE=single. APP_URL falls back to RENDER_EXTERNAL_URL. The health check is /admin/login.
Open the deployed URL and complete /admin/setup immediately: a fresh install can be claimed by whoever gets there first.
Storefronts on their own domain
Storefronts can also be deployed separately, on their own domain, using a publishable key. Admin, API and checkout stay on the platform domain.