Files
falah-mobile/Dockerfile
T
root ed34b186f9 Referral page, bug fixes, seed data, persona tiers
- New /refer page with share/copy/stats
- Fixed modal z-index conflicts (z-50 → z-[60]) across forum, groups, souq, halal-monitor
- Seed route: forum categories, marketplace listings, private groups
- Mufti/Daie personas now available in Premium tier
- Fixed referral share link: falahos.my/mobile/auth?ref=CODE
- Fixed client-side persona access check for premium
2026-06-18 09:38:05 +02:00

37 lines
1.1 KiB
Docker

FROM node:20-alpine
RUN apk add --no-cache openssl ca-certificates curl
WORKDIR /app
RUN addgroup --system --gid 1001 nodejs && adduser --system --uid 1001 nextjs
# Copy standalone build (pre-built outside Docker)
COPY .next/standalone/falah-mobile ./
COPY .next/static ./.next/static
COPY public ./public
COPY prisma/schema.prisma ./prisma/schema.prisma
# Fix Turbopack's hashed Prisma client path
# Turbopack resolves @prisma/client to @prisma/client-<hash> but the
# build-time symlink points to a path that doesn't exist in Docker.
# We copy the existing @prisma/client to the hash name so Node.js
# can resolve it when the Turbopack runtime requires it.
RUN if [ -d ".next/node_modules/@prisma" ]; then \
for d in .next/node_modules/@prisma/client-*; do \
name=$(basename "$d"); \
rm -f "node_modules/@prisma/$name" 2>/dev/null; \
cp -r node_modules/@prisma/client "node_modules/@prisma/$name"; \
done; \
fi
RUN mkdir -p /app/data
USER nextjs
EXPOSE 3000
ENV NODE_ENV=production
ENV DATABASE_URL="file:/app/data/dev.db"
CMD ["node", "server.js"]