-
Notifications
You must be signed in to change notification settings - Fork 217
/
Dockerfile
36 lines (26 loc) · 648 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
FROM node:20-alpine
ENV PSITRANSFER_UPLOAD_DIR=/data \
NODE_ENV=production
MAINTAINER Christoph Wiechert <[email protected]>
RUN apk add --no-cache tzdata
WORKDIR /app
ADD *.js package.json package-lock.json README.md /app/
ADD lib /app/lib
ADD app /app/app
ADD lang /app/lang
ADD plugins /app/plugins
ADD public /app/public
# Rebuild the frontend apps
RUN cd app && \
NODE_ENV=dev npm ci && \
npm run build && \
cd .. && \
mkdir /data && \
chown node /data && \
npm ci && \
rm -rf app
EXPOSE 3000
VOLUME ["/data"]
USER node
# HEALTHCHECK CMD wget -O /dev/null -q http://localhost:3000
CMD ["node", "app.js"]