We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 46efa84 commit e582678Copy full SHA for e582678
Dockerfile
@@ -1,18 +1,26 @@
1
FROM node:12.18.3-alpine3.12
2
-# LABEL author="masb0ymas"
+LABEL author="masb0ymas"
3
4
# Setup Timezone
5
RUN apk add tzdata
6
ENV TZ=Asia/Jakarta
7
8
RUN apk add nano
9
10
-COPY . /var/www
+# Create app directory
11
WORKDIR /var/www
12
13
+COPY package.json /var/www
14
+COPY yarn.lock /var/www
15
+
16
+# Set config npm & install dependencies
17
+RUN npm config set scripts-prepend-node-path true
18
RUN npm install pm2 -g
19
RUN yarn
-RUN npm run build
20
+# RUN yarn build
21
22
+# Bundle app source
23
+COPY . .
24
-# EXPOSE 7000
-CMD ["npm", "run", "serve:production-docker"]
25
+EXPOSE 7000
26
+CMD ["yarn", "start"]
0 commit comments