A generated project is three deployable apps (web, dashboard, api, plus docs when you kept that module) and a Postgres database. All apps read the same env keys, set them on every service.
Environment
The urls matter most:
API_URL= # how the Next servers reach the api (internal url on docker)
API_PUBLIC_URL= # the api url the browser can reach
WEB_URL=
DASHBOARD_URL=
DATABASE_URL=
BETTER_AUTH_SECRET= # openssl rand -base64 32
ADMIN_EMAIL=
ADMIN_PASSWORD=Vercel
Deploy web and dashboard as two Vercel projects from the same repo.
- Import the repo, set the root directory to
apps/web, repeat forapps/dashboard. - Add the env keys above to both.
- Host the
apisomewhere that runs bun or docker, see below, and pointAPI_URLandAPI_PUBLIC_URLat it.
Self-host with docker
Every app has a Dockerfile in apps/<app>/. The build context is the repo root, and turbo prunes the workspace to what the app needs:
docker build -f apps/web/Dockerfile -t my-app-web .
docker build -f apps/dashboard/Dockerfile -t my-app-dashboard .
docker build -f apps/api/Dockerfile -t my-app-api .Next apps are built with output: "standalone" and run on port 3000 with a healthcheck. Pass the env at run time: the web app reads its urls per request, so one image works for every environment.
Dokploy
Dokploy runs the same images.
- Create a project with a Postgres database.
- Add three applications from your repo, build type Dockerfile, with paths
apps/web/Dockerfile,apps/dashboard/Dockerfileandapps/api/Dockerfile, and.as the context. - Set the env keys on each application. Use the api service's internal address for
API_URL. - Attach your domains.
Automated setup
- provision creates the Dokploy projects, S3 buckets, DNS records and turbo cache, and sets up nightly database backups.
- previews deploys every pull request to Dokploy with a Vercel style comment and GitHub deployments.
findplate provision browsersadds a read-only database browser and an S3 browser to the preview environment, see provision.
Hosting these docs
This site ships a Dockerfile too, see docs/README.md in the findplate repo.