canvas / Dockerfile
KilersBotz's picture
Create Dockerfile
a75e162 verified
Raw
History Blame Contribute Delete
487 Bytes
# Gunakan Node.js LTS
FROM node:18
# Install dependency native untuk modul canvas
RUN apt-get update && apt-get install -y \
libcairo2-dev \
libpango1.0-dev \
libjpeg-dev \
libgif-dev \
librsvg2-dev \
&& rm -rf /var/lib/apt/lists/*
# Set working directory
WORKDIR /app
# Copy package.json dan install dependencies
COPY package*.json ./
RUN npm install
# Copy semua source code
COPY . .
# Expose port API
EXPOSE 7860
# Jalankan server
CMD [ "npm", "start" ]