Skip to content

Commit e582678

Browse files
committed
fix: config dockerfile
1 parent 46efa84 commit e582678

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

Dockerfile

+13-5
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,26 @@
11
FROM node:12.18.3-alpine3.12
2-
# LABEL author="masb0ymas"
2+
LABEL author="masb0ymas"
33

44
# Setup Timezone
55
RUN apk add tzdata
66
ENV TZ=Asia/Jakarta
77

88
RUN apk add nano
99

10-
COPY . /var/www
10+
# Create app directory
1111
WORKDIR /var/www
1212

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
1318
RUN npm install pm2 -g
1419
RUN yarn
15-
RUN npm run build
20+
# RUN yarn build
21+
22+
# Bundle app source
23+
COPY . .
1624

17-
# EXPOSE 7000
18-
CMD ["npm", "run", "serve:production-docker"]
25+
EXPOSE 7000
26+
CMD ["yarn", "start"]

0 commit comments

Comments
 (0)