diff --git a/Dockerfile b/Dockerfile index 150ac3a..174e63e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,6 +9,8 @@ RUN apk add --no-cache \ # 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/ +COPY pb_hooks /pb/pb_hooks +COPY pb_public /pb/pb_public EXPOSE 8080 diff --git a/pb_hooks/main.pb.js b/pb_hooks/main.pb.js new file mode 100644 index 0000000..e3ee84b --- /dev/null +++ b/pb_hooks/main.pb.js @@ -0,0 +1,5 @@ +routerAdd("GET", "/hello", (e) => { + let name = e.request.url.query().get("name") || "Person"; + + return e.json(200, { message: "Hello " + name }); +}); diff --git a/pb_public/index.html b/pb_public/index.html new file mode 100644 index 0000000..cde04a5 --- /dev/null +++ b/pb_public/index.html @@ -0,0 +1,64 @@ + + +
+ + +PocketBase is successfully serving this page.
+