Pollinations-ChatBox / Dockerfile
galihrhgnwn's picture
Update Dockerfile
836d310 verified
raw
history blame contribute delete
582 Bytes
# Gunakan Node.js 18 Alpine sebagai base image
FROM node:18-alpine
# Install pnpm secara global
RUN corepack enable && corepack prepare pnpm@latest --activate
# Buat user non-root
RUN adduser -D user
USER user
# Set working directory
WORKDIR /app
# Copy semua file ke dalam container
COPY --chown=user:user . .
# Install dependencies dengan pnpm
RUN pnpm install --frozen-lockfile
# Build aplikasi Next.js
RUN pnpm build
# Expose port 7860 agar bisa diakses dari luar container
EXPOSE 7860
# Jalankan Next.js di port 7860 dan host 0.0.0.0
CMD ["pnpm", "start", "-p", "7860"]