eshala dorost she
This commit is contained in:
+14
-6
@@ -1,14 +1,22 @@
|
||||
FROM node:20
|
||||
FROM node:20-slim
|
||||
|
||||
WORKDIR /app
|
||||
COPY . .
|
||||
|
||||
# فقط package.json و yarn.lock رو کپی کن (برای تشخیص تغییر)
|
||||
COPY package.json yarn.lock ./
|
||||
|
||||
# نصب فقط اگر فایلها تغییر کرده باشند (Docker cache کمک میکنه)
|
||||
RUN yarn install --production
|
||||
|
||||
# فقط .output رو هر بار جدید میفرستی
|
||||
COPY .output .output
|
||||
|
||||
# entrypoint.sh (اختیاری)
|
||||
COPY entrypoint.sh /entrypoint.sh
|
||||
RUN chmod +x /entrypoint.sh
|
||||
|
||||
# Environment replacement process
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
|
||||
ENV PORT=5200
|
||||
EXPOSE 5200
|
||||
CMD ["node", ".output/server/index.mjs"]
|
||||
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
CMD ["node", ".output/server/index.mjs"]
|
||||
|
||||
Reference in New Issue
Block a user