Giter Club home page Giter Club logo

pocketbase-sveltekit-starter's Issues

Unable to run development version using docker compose

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.

404 Not Found

docker compose logs -f pss

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/_/

FR: More details about how to use prebuilt pockebase binary?

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.

docker example doesn't work

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

inside docker the directories are simply empty
image

/api/hello 404

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":{}}

How to hot reload the frontend and backend at the same time?

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",

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.