aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsaturneric <[email protected]>2025-07-05 17:38:38 +0000
committersaturneric <[email protected]>2025-07-05 17:38:38 +0000
commit43f7c3fae3a0df7063cde9f5de5bb857e6b0e6b3 (patch)
tree7a1e6e85e142e102d4504ca7999338b14852098e
parentrefactor(docker): simplify Dockerfile and nginx configuration (diff)
downloadManual-43f7c3fae3a0df7063cde9f5de5bb857e6b0e6b3.tar.gz
Manual-43f7c3fae3a0df7063cde9f5de5bb857e6b0e6b3.zip
refactor(docker): improve Dockerfile structure and nginx configuration
* Added missing line breaks for better readability. * Changed the nginx configuration path to use `ADD` instead of `COPY`. * Updated the exposed port from `8080` to `80/tcp` for standardization.
-rw-r--r--Dockerfile13
1 files changed, 11 insertions, 2 deletions
diff --git a/Dockerfile b/Dockerfile
index c29cda7..034c64a 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,11 +1,20 @@
FROM node:lts-alpine AS build
+
WORKDIR /app
+
COPY package*.json ./
+
RUN npm install
+
COPY . .
+
RUN npm run build
FROM nginx:alpine AS runtime
-COPY ./nginx/nginx.conf /etc/nginx/nginx.conf
+
+WORKDIR /usr/share/nginx/html
+
COPY --from=build /app/dist /usr/share/nginx/html
-EXPOSE 8080 \ No newline at end of file
+ADD nginx.conf /etc/nginx/conf.d/default.conf
+
+EXPOSE 80/tcp \ No newline at end of file