forked from notea-org/notea
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
33 lines (20 loc) · 690 Bytes
/
Dockerfile
File metadata and controls
33 lines (20 loc) · 690 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
# Stage 1: Building the code
FROM node:16-alpine AS builder
WORKDIR /app
COPY package.json yarn.lock ./
RUN yarn install --frozen-lockfile
COPY . .
RUN yarn build
RUN yarn install --production --frozen-lockfile
# Stage 2: And then copy over node_modules, etc from that stage to the smaller base image
FROM node:16-alpine as production
WORKDIR /app
# COPY package.json next.config.js .env* ./
COPY --from=builder /app/public ./public
COPY --from=builder /app/.next ./.next
COPY --from=builder /app/node_modules ./node_modules
VOLUME /app/config
# VOLUME /app/data
ENV CONFIG_FILE=/app/config/notea.yml LOG_DIRECTORY=/app/logs
EXPOSE 3000
CMD ["node_modules/.bin/next", "start"]