Update Dockerfile

This commit is contained in:
jmal 2024-03-04 13:56:49 +08:00 committed by GitHub
parent ef74bc2c85
commit 73a0236d88
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,22 +1,10 @@
FROM node:16 as builder
WORKDIR /app
COPY package.json ./
RUN npm install
COPY . .
RUN npm run build:prod
FROM nginx:latest
COPY nginx.conf /etc/nginx/nginx.conf
COPY nginx.conf /etc/nginx/nginx.conf.template
COPY --from=builder /app/dist /usr/share/nginx/html
COPY dist /var/www/public
COPY docker-entrypoint.sh /docker-entrypoint.sh
RUN chmod +x /docker-entrypoint.sh