iaiuse commited on
Commit
547e3a8
1 Parent(s): 11a1e60

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +17 -0
Dockerfile ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # build stage
2
+ FROM node:lts-alpine AS build-stage
3
+ # Set environment variables for non-interactive npm installs
4
+ ENV NPM_CONFIG_LOGLEVEL warn
5
+ ENV CI true
6
+ WORKDIR /app
7
+ COPY package.json pnpm-lock.yaml ./
8
+ RUN npm install -g pnpm && pnpm i --frozen-lockfile
9
+ COPY . .
10
+ RUN pnpm build
11
+
12
+ # production stage
13
+ FROM nginx:stable-alpine AS production-stage
14
+ COPY --from=build-stage /app/dist /usr/share/nginx/html
15
+ COPY nginx.conf /etc/nginx/conf.d/default.conf
16
+ EXPOSE 80
17
+ CMD ["nginx", "-g", "daemon off;"]