From 62139b697bd643ec39bcaf2c2ba4135d874b0e1b Mon Sep 17 00:00:00 2001 From: morteza-mortezai Date: Sat, 6 Jun 2026 09:02:03 +0330 Subject: [PATCH] update docker --- .dockerignore | 6 ++++++ Dockerfile | 15 ++++++++------- 2 files changed, 14 insertions(+), 7 deletions(-) create mode 100644 .dockerignore diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..5b259ac --- /dev/null +++ b/.dockerignore @@ -0,0 +1,6 @@ +node_modules +dist +.git +.github +.env +*.md diff --git a/Dockerfile b/Dockerfile index 9c66677..33221b6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,10 +1,13 @@ FROM node:22-alpine AS builder -# Install tzdata to support timezone settings -RUN apk add --no-cache tzdata +RUN sed -i 's|https://dl-cdn.alpinelinux.org/alpine|https://mirror.de.velop.ir/alpine|g' /etc/apk/repositories -# Set the timezone to Asia/Tehran -RUN cp /usr/share/zoneinfo/Asia/Tehran /etc/localtime && echo "Asia/Tehran" > /etc/timezone +ENV TZ=Asia/Tehran +ENV NPM_CONFIG_REGISTRY=https://mirror-npm.runflare.com + +RUN apk add tzdata \ + && cp /usr/share/zoneinfo/Asia/Tehran /etc/localtime \ + && echo "Asia/Tehran" > /etc/timezone WORKDIR /build COPY package*.json ./ @@ -15,9 +18,7 @@ RUN npm run build FROM nginx:stable-alpine AS production-stage COPY --from=builder /build/dist /usr/share/nginx/html - -COPY --from=builder /build/nginx.con[f] /etc/nginx/conf.d/default.conf -RUN cat /etc/nginx/conf.d/default.conf +COPY --from=builder /build/nginx.conf /etc/nginx/conf.d/default.conf EXPOSE 80