update docker
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
node_modules
|
||||
dist
|
||||
.git
|
||||
.github
|
||||
.env
|
||||
*.md
|
||||
+8
-7
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user