DiffMT / Dockerfile
Koddenbrock's picture
refactor Dockerfile to simplify user setup and data directory creation
3809cb4
FROM node:20-alpine
WORKDIR /app
# Install dependencies first (cached layer)
COPY package.json ./
RUN npm install --omit=dev
# Copy app files
COPY server.js ./
COPY public/ ./public/
COPY images/ ./images/
# HF Spaces requires port 7860
ENV PORT=7860
# HF Spaces mounts the persistent bucket (HTW-KI-Werkstatt/DiffMT-storage) at /data
ENV DATA_PATH=/data/results.json
EXPOSE 7860
RUN mkdir -p data
CMD ["node", "server.js"]