spinspire / pocketbase-sveltekit-starter Goto Github PK
View Code? Open in Web Editor NEWa starter project to build a SvelteKit frontend with PocketBase backend
License: MIT License
a starter project to build a SvelteKit frontend with PocketBase backend
License: MIT License
Hi,
I'm running into some trouble getting the docker development environment running.
I cloned the project and tried standing up the repo using docker compose. I updated the .env
and other files as mentioned in the READMEs.
I'm running into this error:
Error response from daemon: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: exec: "/go/bin/air": stat /go/bin/air: no such file or directory: unknown
Its downloading the cosmtrek/air
repo but for some reason the executable isn't being found. Am I missing a step somewhere?
I'm on a Mac M1 device, if that could be a problem.
infra-pss-1 |
infra-pss-1 | __ _ ___
infra-pss-1 | / /\ | | | |)
infra-pss-1 | //--\ || || _ , built with Go 1.19.4
infra-pss-1 |
infra-pss-1 | mkdir /app/tmp
infra-pss-1 | watching .
infra-pss-1 | watching hooks
infra-pss-1 | watching pb_migrations
infra-pss-1 | !exclude tmp
infra-pss-1 | building...
infra-pss-1 | !exclude .cache
infra-pss-1 | go: downloading github.com/pocketbase/pocketbase v0.10.3
infra-pss-1 | go: downloading github.com/labstack/echo/v5 v5.0.0-20220201181537-ed2888cfa198
infra-pss-1 | go: downloading github.com/fatih/color v1.13.0
infra-pss-1 | go: downloading github.com/mattn/go-sqlite3 v1.14.16
infra-pss-1 | go: downloading github.com/pocketbase/dbx v1.8.0
infra-pss-1 | go: downloading github.com/AlecAivazis/survey/v2 v2.3.6
infra-pss-1 | go: downloading github.com/spf13/cobra v1.6.1
infra-pss-1 | go: downloading github.com/dop251/goja v0.0.0-20221118162653-d4bf6fde1b86
infra-pss-1 | go: downloading github.com/dop251/goja_nodejs v0.0.0-20221009164102-3aa5028e57f6
infra-pss-1 | go: downloading github.com/go-ozzo/ozzo-validation/v4 v4.3.0
infra-pss-1 | go: downloading github.com/spf13/cast v1.5.0
infra-pss-1 | go: downloading golang.org/x/oauth2 v0.3.0
infra-pss-1 | go: downloading github.com/mattn/go-colorable v0.1.13
infra-pss-1 | go: downloading github.com/mattn/go-isatty v0.0.16
infra-pss-1 | go: downloading golang.org/x/sync v0.1.0
infra-pss-1 | go: downloading golang.org/x/crypto v0.4.0
infra-pss-1 | go: downloading github.com/aws/aws-sdk-go v1.44.165
infra-pss-1 | go: downloading github.com/disintegration/imaging v1.6.2
infra-pss-1 | go: downloading github.com/gabriel-vasile/mimetype v1.4.1
infra-pss-1 | go: downloading gocloud.dev v0.27.0
infra-pss-1 | go: downloading github.com/domodwyer/mailyak/v3 v3.3.4
infra-pss-1 | go: downloading golang.org/x/net v0.4.0
infra-pss-1 | go: downloading github.com/ganigeorgiev/fexpr v0.1.1
infra-pss-1 | go: downloading github.com/spf13/pflag v1.0.5
infra-pss-1 | go: downloading github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51
infra-pss-1 | go: downloading golang.org/x/term v0.3.0
infra-pss-1 | go: downloading github.com/valyala/fasttemplate v1.2.2
infra-pss-1 | go: downloading golang.org/x/time v0.3.0
infra-pss-1 | go: downloading github.com/golang-jwt/jwt/v4 v4.4.3
infra-pss-1 | go: downloading github.com/dlclark/regexp2 v1.7.0
infra-pss-1 | go: downloading golang.org/x/text v0.5.0
infra-pss-1 | go: downloading golang.org/x/sys v0.3.0
infra-pss-1 | go: downloading github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d
infra-pss-1 | go: downloading golang.org/x/image v0.2.0
infra-pss-1 | go: downloading go.opencensus.io v0.24.0
infra-pss-1 | go: downloading github.com/aws/aws-sdk-go-v2/service/s3 v1.29.6
infra-pss-1 | go: downloading github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.46
infra-pss-1 | go: downloading github.com/aws/aws-sdk-go-v2 v1.17.3
infra-pss-1 | go: downloading github.com/aws/smithy-go v1.13.5
infra-pss-1 | go: downloading github.com/google/wire v0.5.0
infra-pss-1 | go: downloading github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d
infra-pss-1 | go: downloading github.com/go-sourcemap/sourcemap v2.1.3+incompatible
infra-pss-1 | go: downloading github.com/valyala/bytebufferpool v1.0.0
infra-pss-1 | go: downloading golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2
infra-pss-1 | go: downloading google.golang.org/grpc v1.51.0
infra-pss-1 | go: downloading github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.4.10
infra-pss-1 | go: downloading github.com/aws/aws-sdk-go-v2/internal/v4a v1.0.18
infra-pss-1 | go: downloading github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.27
infra-pss-1 | go: downloading github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.9.11
infra-pss-1 | go: downloading github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.1.22
infra-pss-1 | go: downloading github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.21
infra-pss-1 | go: downloading github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.13.21
infra-pss-1 | go: downloading github.com/aws/aws-sdk-go-v2/config v1.18.7
infra-pss-1 | go: downloading github.com/googleapis/gax-go/v2 v2.7.0
infra-pss-1 | go: downloading github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da
infra-pss-1 | go: downloading github.com/jmespath/go-jmespath v0.4.0
infra-pss-1 | go: downloading github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.21
infra-pss-1 | go: downloading github.com/aws/aws-sdk-go-v2/credentials v1.13.7
infra-pss-1 | go: downloading github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.12.21
infra-pss-1 | go: downloading github.com/aws/aws-sdk-go-v2/internal/ini v1.3.28
infra-pss-1 | go: downloading github.com/aws/aws-sdk-go-v2/service/sso v1.11.28
infra-pss-1 | go: downloading github.com/aws/aws-sdk-go-v2/service/ssooidc v1.13.11
infra-pss-1 | go: downloading github.com/aws/aws-sdk-go-v2/service/sts v1.17.7
infra-pss-1 | go: downloading google.golang.org/api v0.105.0
infra-pss-1 | go: downloading google.golang.org/protobuf v1.28.1
infra-pss-1 | go: downloading google.golang.org/genproto v0.0.0-20221207170731-23e4bf6bdc37
infra-pss-1 | go: downloading github.com/golang/protobuf v1.5.2
infra-pss-1 | running...
infra-pss-1 | !exclude pb_data
infra-pss-1 | > Server started at: http://0.0.0.0:8090
infra-pss-1 | - REST API: http://0.0.0.0:8090/api/
infra-pss-1 | - Admin UI: http://0.0.0.0:8090/_/
Just a courtesy to let you know this project has been added to https://github.com/benallfree/awesome-pocketbase :)
Hello,
It seems a good base to start messing with PB and SK :) Thank you @jkdoshi !
Which license is it? MIT?
I'm a bit confused about how to use this if we don't really care to modify and compile a custom pocketbase
binary
The backend
folder just says to copy the pocketbase
binary into the backend
folder.
But is that all we need to do?
It seems like the top-level docker-compose
setup calls the Dockerfile
in backend
, but backend/Dockerfile
always recompiles from source.
Is it possible to add a ARG prebuilt_pocketbase_version
to backend/Dockerfile
that downloads that specific version of the binary instead of compiling it? Then we could modify the docker-compose.override.yaml
to supply that.
exact command ran:
git clone https://github.com/spinspire/pocketbase-sveltekit-starter; cd pocketbase-sveltekit-starter; docker compose up -d
error:
[+] Running 2/3
✔ Network pocketbase-sveltekit-starter_default Created 0.7s
- Container pocketbase-sveltekit-starter-pb-1 Starting 2.1s
✔ Container pocketbase-sveltekit-starter-sk-1 Started 1.8s
Error response from daemon: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: exec: "/app/pb/entrypoint.sh": stat /app/pb/entrypoint.sh: no such file or directory: unknown
at /backend
go run main.go serve
when i visited /api/hello
return :
Hello world!
after npm run build
,at /frontend
npm run dev:backend
npm run dev
when i visited /api/hello
return :
{"code":404,"message":"Not Found.","data":{}}
Trying to create a docker-compose.yaml file to run/build both frontend and backend Dockerrun files in hot reload without the need for any manual commands intervention.
Kindly let me know if can help out :)
Would be great if there was an example of how to deploy this to somewhere -- maybe fly.io since it's got a free tier?
I found I have to build the frontend first before i run npm run dev:backend
,
but when i builded the frontend,I editing the frontend's code ,It may not change at the same time.
"dev:backend": "cd ../backend && air serve --publicDir=../frontend/build",
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.