-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
39 lines (25 loc) · 837 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# docker build -t teambeat .
# docker run -p 8080:8080 teambeat
# docker run -p 8080:8080 -v "$(pwd)"/pb/pb_data:/pb/pb_data teambeat
# pb/pocketbase serve --http=localhost:8080 --dir pb/pb_data/
FROM node:19-alpine
WORKDIR /usr/src/app
COPY svelte.config.js ./
COPY vite.config.js ./
COPY package*.json ./
RUN npm install
COPY ./src ./src
COPY ./static ./static
RUN npm run build
FROM alpine:latest
ARG PB_VERSION=0.17.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/
EXPOSE 8080
COPY --from=0 /usr/src/app/build ./build
# start PocketBase
CMD ["/pb/pocketbase", "serve", "--http=0.0.0.0:8080", "--publicDir", "build"]