CoolFace
Apppublic

0ZeroXD/code-to-beautifull

sourceHugging Faceupdated 6mo agoView on Hugging Face
0likes
Dockerfile42 linesDownload Raw Back to root
1# Step 1: Base Image2FROM node:203 4# PNPM install karein5RUN npm install -g pnpm6 7WORKDIR /app8 9# 1. Code clone karein10RUN git clone https://github.com/riccardoperra/codeimage.git .11 12# 2. Native dependencies13RUN apt-get update && apt-get install -y \14    python3 make g++ gcc \15    libpixman-1-dev libcairo2-dev libpango1.0-dev \16    libjpeg-dev libgif-dev librsvg2-dev \17    && rm -rf /var/lib/apt/lists/*18 19# 3. PNPM security bypass20RUN pnpm config set ignore-scripts false21 22# 4. Dependencies install23RUN pnpm install --no-frozen-lockfile24 25# --- PRISMA VERSION FIX ---26ENV DATABASE_URL="postgresql://postgres:password@localhost:5432/postgres"27RUN npx prisma@4.15.0 generate --schema=apps/api/prisma/schema.prisma28 29# 5. Pura project build karein30RUN pnpm -r exec npm run build --if-present31 32# --- RUNTIME CONFIG ---33EXPOSE 786034ENV PORT=786035ENV HOST=0.0.0.036ENV NODE_ENV=production37 38# 6. --- SMART START COMMAND ---39RUN npm install -g serve40 41# Yeh command khud 'dist' folder dhoondh kar usay serve karegi!42CMD ["sh", "-c", "DIST_PATH=$(dirname $(find . -path '*/dist/index.html' | grep -v node_modules | head -n 1)); echo 'UI folder found at:' $DIST_PATH; serve -s $DIST_PATH -l 7860"]