diff options
author | saturneric <[email protected]> | 2025-07-05 17:38:38 +0000 |
---|---|---|
committer | saturneric <[email protected]> | 2025-07-05 17:38:38 +0000 |
commit | 43f7c3fae3a0df7063cde9f5de5bb857e6b0e6b3 (patch) | |
tree | 7a1e6e85e142e102d4504ca7999338b14852098e | |
parent | refactor(docker): simplify Dockerfile and nginx configuration (diff) | |
download | Manual-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-- | Dockerfile | 13 |
1 files changed, 11 insertions, 2 deletions
@@ -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 |