-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
44 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
FROM node:alpine as build | ||
|
||
ADD . /app | ||
WORKDIR /app | ||
|
||
RUN npm install | ||
RUN npm run build | ||
|
||
|
||
FROM alpine:latest | ||
|
||
ARG PB_VERSION=0.19.4 | ||
|
||
RUN apk add --no-cache \ | ||
unzip \ | ||
ca-certificates | ||
|
||
# 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 --from=build /app/build /pb_public | ||
|
||
# uncomment to copy the local pb_migrations dir into the image | ||
# COPY ./pb_migrations /pb/pb_migrations | ||
|
||
# uncomment to copy the local pb_hooks dir into the image | ||
# COPY ./pb_hooks /pb/pb_hooks | ||
|
||
EXPOSE 8090 | ||
|
||
# start PocketBase | ||
CMD ["/pb/pocketbase", "serve", "--http=0.0.0.0:8090", "--dir=/pb_data", "--publicDir=/pb_public"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
services: | ||
runbacks: | ||
container_name: runbacks | ||
build: . | ||
volumes: | ||
- $VOLUME_PATH/Runbacks/pb:/pb_data | ||
ports: | ||
- 6533:8090 | ||
restart: unless-stopped |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
import PocketBase from "pocketbase"; | ||
|
||
const pb = new PocketBase("https://runback-db.yhprum.com"); | ||
const pb = new PocketBase(); | ||
|
||
export default pb; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters