Update Dockerfile
Browse files- Dockerfile +11 -10
Dockerfile
CHANGED
@@ -12,9 +12,13 @@ RUN yarn install --registry https://registry.npmmirror.com/ && yarn run build
|
|
12 |
|
13 |
FROM node:lts-alpine
|
14 |
|
15 |
-
|
16 |
-
|
17 |
-
COPY --from=
|
|
|
|
|
|
|
|
|
18 |
|
19 |
# Install production dependencies
|
20 |
RUN yarn install --production --registry https://registry.npmmirror.com/
|
@@ -22,11 +26,8 @@ RUN yarn install --production --registry https://registry.npmmirror.com/
|
|
22 |
# Create the log directory and grant write permissions
|
23 |
RUN mkdir -p /app/logs && chmod 777 /app/logs
|
24 |
|
25 |
-
#
|
26 |
-
|
27 |
-
|
28 |
-
# Expose port
|
29 |
-
EXPOSE $PORT
|
30 |
|
31 |
-
#
|
32 |
-
CMD ["
|
|
|
12 |
|
13 |
FROM node:lts-alpine
|
14 |
|
15 |
+
|
16 |
+
# Copy the built files and required directories
|
17 |
+
COPY --from=build /app/configs /app/configs
|
18 |
+
COPY --from=build /app/package.json /app/package.json
|
19 |
+
COPY --from=build /app/dist /app/dist
|
20 |
+
COPY --from=build /app/public /app/public
|
21 |
+
COPY --from=build /app/node_modules /app/node_modules
|
22 |
|
23 |
# Install production dependencies
|
24 |
RUN yarn install --production --registry https://registry.npmmirror.com/
|
|
|
26 |
# Create the log directory and grant write permissions
|
27 |
RUN mkdir -p /app/logs && chmod 777 /app/logs
|
28 |
|
29 |
+
# Expose the port your app runs on
|
30 |
+
EXPOSE 8000
|
|
|
|
|
|
|
31 |
|
32 |
+
# Command to run your app using npm
|
33 |
+
CMD ["npm", "start"]
|