Db / Dockerfile
Neon-AI's picture
Create Dockerfile
47da202 verified
raw
history blame contribute delete
504 Bytes
# NT DB — Dockerfile for Hugging Face Spaces
FROM node:20-slim
WORKDIR /app
# Copy package files and install dependencies
COPY package.json ./
RUN npm install --production
# Copy source files
COPY server.js ./
COPY api/ ./api/
# Persistent data lives at /data on HF Spaces
# (mount a persistent disk volume at /data in your Space settings)
ENV DB_DIR=/data/db
ENV PORT=7860
# Create default db dir in case no persistent disk is mounted
RUN mkdir -p /data/db
EXPOSE 7860
CMD ["node", "server.js"]