From 93ae7469c3d0ba0c4648558059cea6407a60bc83 Mon Sep 17 00:00:00 2001 From: Mehdi Mehrmanesh Date: Sun, 16 Nov 2025 17:04:36 +0330 Subject: [PATCH] update deploy.yaml --- Dockerfile | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..44b2d4c --- /dev/null +++ b/Dockerfile @@ -0,0 +1,24 @@ +FROM node:20-alpine AS builder + +# Install tzdata to support timezone settings +RUN apk add --no-cache tzdata + +# Set the timezone to Asia/Tehran +RUN cp /usr/share/zoneinfo/Asia/Tehran /etc/localtime && echo "Asia/Tehran" > /etc/timezone + +WORKDIR /build +COPY package*.json ./ +RUN npm install +COPY . ./ +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 + +EXPOSE 80 + +CMD ["nginx", "-g", "daemon off;"] \ No newline at end of file