- clone this repo
- put pocketbase file inside
pbfolder - install
- run using
./pocketbase serveinsidepbfolder
Follow this instruction
DOCKER SETUP:
FROM alpine:latest
ARG PB_VERSION=0.25.8 // use the version of PB you're using
RUN apk add --no-cache \
unzip \
ca-certificates \
# this is needed only if you want to use scp to copy later your pb_data locally
openssh
# download and unzip PocketBase
ADD https://github.com/pocketbase/pocketbase/releases/download/v${PB_VERSION}/pocketbase_${PB_VERSION}_linux_amd64.zip /tmp/pb.zip
RUN unzip /tmp/pb.zip -d /pb/
# uncomment to copy the local pb_migrations dir into the container
# COPY ./pb_migrations /pb/pb_migrations
# uncomment to copy the local pb_hooks dir into the container
# COPY ./pb_hooks /pb/pb_hooks
EXPOSE 8080
# start PocketBase
CMD ["/pb/pocketbase", "serve", "--http=0.0.0.0:8080"]
Run flyctl auth signup to create a Fly.io account (email or GitHub).
Run flyctl auth login to login.
run flyctl launch --build-only on the same route
price accordingly https://fly.io/docs/about/pricing/#free-allowances (<$5)
flyctl volumes create pb_data --size=1
add this in fly.toml
[mounts]
destination = "/pb/pb_data"
source = "pb_data"
flyctl deploy
Note: The first time when you try to access the PocketBase dashboard you'll have to check your Fly Monitoring logs for the PocketBase installer page url in order to setup your superuser account (replace localhost with your Fly url). For more details why this change was introduced, you can check #5814.
Note: don't need to install pocketbase-typegen
package scripts
"pb": "pb/pocketbase serve",
"typegen": "npx pocketbase-typegen --env --out ./src/types/pb.d.ts"
envs
PB_TYPEGEN_EMAIL=
PB_TYPEGEN_PASSWORD=
PB_TYPEGEN_URL=
.gitignore
# pocketbase
pb/pocketbase
pb/pb_data
pb/pb_data/*
pb/LICENSE.md
Everything you need to build a Svelte project, powered by sv.
If you're seeing this, you've probably already done this step. Congrats!
# create a new project in the current directory
npx sv create
# create a new project in my-app
npx sv create my-appOnce you've created a project and installed dependencies with npm install (or pnpm install or yarn), start a development server:
npm run dev
# or start the server and open the app in a new browser tab
npm run dev -- --openTo create a production version of your app:
npm run buildYou can preview the production build with npm run preview.
To deploy your app, you may need to install an adapter for your target environment.