Fix for production

This commit is contained in:
mahmood
2026-09-10 22:37:29 +03:30
parent efb0051ab9
commit ec899defb9
95 changed files with 219589 additions and 110 deletions
+5 -25
View File
@@ -1,30 +1,10 @@
FROM node:20-alpine AS builder
FROM docker.arvancloud.ir/nginx:latest
ENV PNPM_HOME="/pnpm"
ENV PATH="$PNPM_HOME:$PATH"
RUN corepack enable pnpm
# بیلد لوکال: pnpm --filter @lucky-wheel/admin build
# (با apps/admin/.env.production)
WORKDIR /app
COPY . .
RUN pnpm install --frozen-lockfile
RUN pnpm --filter @lucky-wheel/admin build
FROM nginx:alpine
COPY --from=builder /app/apps/admin/dist /usr/share/nginx/html
# Configure Nginx for Single Page Application
RUN echo 'server { \
listen 80; \
server_name localhost; \
location / { \
root /usr/share/nginx/html; \
index index.html index.htm; \
try_files $uri $uri/ /index.html; \
} \
}' > /etc/nginx/conf.d/default.conf
COPY apps/admin/nginx.conf /etc/nginx/conf.d/default.conf
COPY apps/admin/dist /usr/share/nginx/html
EXPOSE 80