Plugin orientated custom pocketbase builder, inspired by xcaddy.
This is a working example of building pocketbase with plugin support on the server.
- Golang
Install from source:
go install github.com/kennethklee/xpb/xpocketbase@latest
xpocketbase build <version>
will build a pocketbase
binary.
# Build a specific version of pocketbase
xpocketbase build master
xpocketbase build v0.8.0
# Build the examples/base pocketbase
xpocketbase build latest \
--with github.com/kennethklee/xpb/plugins/static \
--with github.com/kennethklee/xpb/plugins/migrations-js \
--with github.com/kennethklee/xpb/plugins/timeouts
# Build with plugin module in current directory
xpocketbase build latest \
--with my-module=.
# Specific version
xpocketbase build latest \
--with github.com/kennethklee/xpb/plugins/[email protected]
# Replaces contents of module with contents elsewhere
xpocketbase build latest \
--with github.com/kennethklee/xpb/plugins/[email protected]=../plugins/static
# go build flags
xpocketbase build latest \
--with github.com/kennethklee/xpb/plugins/[email protected] \
-- -ldflags "-s -w"