-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
40 lines (29 loc) · 929 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
################################################################################
# BASE
# This is the stage that the other stages in this file are based on.
# - defines the Node version
# - set global configuration
# - set default work dir
################################################################################
FROM node:18.16-alpine as base
RUN apk add --update --no-cache git python3 make g++
ENV HUSKY=0
# Apply Yarn settings
RUN yarn config set cache-folder ~/.yarn \
&& yarn config set network-timeout 300000 -g \
&& yarn config set prefer-offline true
# Create app directory
WORKDIR /workspace
# Copy package.json and the lock file
COPY package.json yarn.lock /workspace/
# Install app dependencies
RUN yarn
# Copy source files
COPY . .
# Build apps
RUN yarn build
COPY prisma/schema.prisma /workspace/prisma/schema.prisma
# Expose default port
EXPOSE 3000
# Start server
CMD ["yarn", "start"]