forked from parse-community/parse-server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
36 lines (26 loc) · 584 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
# Build stage
FROM node:lts-alpine as build
RUN apk update; \
apk add git;
WORKDIR /tmp
COPY package*.json ./
RUN npm ci
COPY . .
RUN npm run build
# Release stage
FROM node:lts-alpine as release
RUN apk update; \
apk add git;
VOLUME /parse-server/cloud /parse-server/config
WORKDIR /parse-server
COPY package*.json ./
RUN npm ci --production --ignore-scripts
COPY bin bin
COPY public_html public_html
COPY views views
COPY --from=build /tmp/lib lib
RUN mkdir -p logs && chown -R node: logs
ENV PORT=1337
USER node
EXPOSE $PORT
ENTRYPOINT ["node", "./bin/parse-server"]