forked from subnub/myDrive
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
36 lines (25 loc) · 813 Bytes
/
Dockerfile
File metadata and controls
36 lines (25 loc) · 813 Bytes
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-bullseye AS builder
# Install build dependencies
RUN apt-get update && \
apt-get install -y python3 make g++ ffmpeg tesseract-ocr libtesseract-dev libleptonica-dev pkg-config ca-certificates && \
ln -sf python3 /usr/bin/python3
WORKDIR /usr/app-production
COPY package*.json ./
RUN npm install
COPY . .
COPY .env ./backend/config/.env.production
RUN npm run build
# Remove dev dependencies
RUN npm prune --production
FROM node:20-bullseye
ENV FS_DIRECTORY=/data/
ENV TEMP_DIRECTORY=/temp/
# Install runtime dependencies
RUN apt-get update && \
apt-get install -y ffmpeg tesseract-ocr libtesseract-dev libleptonica-dev pkg-config ca-certificates
WORKDIR /usr/app-production
COPY --from=builder /usr/app-production .
EXPOSE 8080
EXPOSE 3000
EXPOSE 80
CMD ["npm", "run", "start"]