[PIE-1] add api docker files

This commit is contained in:
2025-08-11 20:13:00 +12:00
parent 5b0a6561b0
commit 0c692a62e8
5 changed files with 73 additions and 1 deletions

25
api/Dockerfile Normal file
View File

@@ -0,0 +1,25 @@
FROM alpine:latest
ARG PB_VERSION=0.29.2
ENV PB_DATA_DIR=/pb_data
WORKDIR /pb
RUN apk add --no-cache \
unzip \
curl \
ca-certificates \
bash
# 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 entrypoint
COPY docker-entrypoint.sh /usr/local/bin/
RUN chmod +x /usr/local/bin/docker-entrypoint.sh
EXPOSE 8080
ENTRYPOINT ["docker-entrypoint.sh"]
CMD ["serve", "--http=0.0.0.0:8080"]