created dockerfile for deployment with dokploy.

This commit is contained in:
2026-06-04 19:31:13 +02:00
parent aecd49a1bc
commit eca8b6c815
5 changed files with 99 additions and 0 deletions
+26
View File
@@ -70,6 +70,32 @@ For a single local smoke test that builds and starts the production server:
pnpm prod
```
## Docker Deployment
The root `Dockerfile` builds the SvelteKit Node server with pnpm and runs it with `node build`.
Build locally:
```sh
docker build \
--build-arg PUBLIC_CONVEX_URL=https://your-production-deployment.convex.cloud \
--build-arg PUBLIC_CONVEX_SITE_URL=https://your-production-deployment.convex.site \
-t journaley .
```
Run locally:
```sh
docker run --rm -p 3000:3000 \
-e PUBLIC_CONVEX_URL=https://your-production-deployment.convex.cloud \
-e PUBLIC_CONVEX_SITE_URL=https://your-production-deployment.convex.site \
-e HOST=0.0.0.0 \
-e PORT=3000 \
journaley
```
For Dokploy, choose a Dockerfile deployment, keep the Dockerfile path as `Dockerfile`, expose container port `3000`, and set the same environment variables in the Dokploy app settings. The public Convex URLs are also defined as Docker build args because SvelteKit's public static env values are compiled into the app during the image build.
## Auth
This project uses Convex Auth with email/password for local development. The initializer created `convex/auth.config.ts`, `convex/auth.ts`, and `convex/http.ts`; the frontend uses `@mmailaender/convex-auth-svelte` for SvelteKit auth state and auth routes.