Welcome to the PocketBase + SvelteKit project template! This template allows you to effortlessly create a single Docker container housing both the backend (PocketBase) and frontend (SvelteKit) for your projects. With a minimal image size of just 55 MB, it's perfect for cost-effective hosting providers and projects without extensive public pages that require SEO.
pocketbase/
: Backend files, including hooks and migrations.sveltekit/
: SvelteKit project with preconfigured routes /login
, /register
, and an auth-protected group (auth)
. In production builds, frontend files are copied as pb_public
to the PocketBase container.adapter-static
(SPA mode), disabling server-side rendering for a streamlined production setup.build.yaml
could be manually triggered to push the docker image to ghcr.io
docker compose -f compose.dev.yaml up
.bun
or npm
.PUBLIC_POCKETBASE_URL
env variable if your PocketBase server is not accessible at localhost:8090
.docker compose -f compose.prod.yaml up
or build the Docker image with target prod
first.base
: Used for the dev server with all PocketBase directories mounted.prod
: Used for the production build, embedding frontend, hooks, and migrations into the image.cd sveltekit
bunx @svelte-add/tailwindcss@latest
bun install
We welcome contributions! Please feel free to submit issues or pull requests.
This project is licensed under the MIT License.
Special thanks to PocketBase, SvelteKit, and the authors of other PocketBase-SvelteKit templates (1, 2).
If you have any questions or feedback, please use the GitHub Issues page.