spinspire / pocketbase-sveltekit-starter

a starter project to build a SvelteKit frontend with PocketBase backend
MIT License
363 stars 62 forks source link

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

Closed ankushg closed 1 year ago

ankushg commented 1 year ago

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.

jkdoshi commented 1 year ago

Thank you for @ankushg for helping improve this project. And sorry for not documenting this correctly. I was assuming that people won't be using docker-compose when using the prebuilt binary.

Here's your solution:

Change the pb section of the docker-compose.yml like this:

...
  pb:
    # build: backend
    # image: pocketbase-custom
    image: alpine:latest
    entrypoint: /app/pocketbase
...

Notable changes above from the original:

Please try it and let me know. Reopen the issue if still having problems.