-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
48 lines (33 loc) · 1014 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
40
41
42
43
44
45
46
47
48
FROM node:18.16.0-alpine3.16 AS runtime
RUN apk add --no-cache imagemagick
# ! ######################################
FROM runtime AS build
WORKDIR /app
COPY . .
RUN npm install
ENV PUBLIC_BASE_URL=http://localhost:3000
ENV VITE_PUBLIC_BASE_URL=http://localhost:3000
ENV ORIGIN=http://localhost:3000
ENV PROTOCOL_HEADER=x-forwarded-proto
ENV HOST_HEADER=x-forwarded-host
ENV SECRET_DATA_PATH=./data
ENV TZ='Etc/UTC'
ENV SECRET_BINARYKITS_ZPL_BASE_URL='http://binarykits-zpl'
RUN npm run build
# ! ######################################
FROM runtime
WORKDIR /app
RUN rm -rf ./*
COPY --from=build /app/package*.json ./
RUN npm install
COPY --from=build /app/build .
EXPOSE 3000
ENV PUBLIC_BASE_URL=http://localhost:3000
ENV VITE_PUBLIC_BASE_URL=http://localhost:3000
ENV ORIGIN=http://localhost:3000
ENV PROTOCOL_HEADER=x-forwarded-proto
ENV HOST_HEADER=x-forwarded-host
ENV SECRET_DATA_PATH=./data
ENV TZ='Etc/UTC'
ENV SECRET_BINARYKITS_ZPL_BASE_URL='http://binarykits-zpl'
CMD [ "node", "index.js" ]