data2 / Dockerfile
blaze-aura69's picture
Update Dockerfile
9709a2d verified
Raw
History Blame Contribute Delete
614 Bytes
FROM node:20-alpine
WORKDIR /app
# Install build dependencies including Python setuptools for node-gyp
RUN apk add --no-cache \
python3 \
py3-setuptools \
make \
g++ \
vips-dev \
vips-tools
# Fix Python distutils issue with node-gyp
ENV PYTHONPATH=/usr/lib/python3.12/site-packages
COPY package*.json ./
# Install dependencies
RUN npm install --omit=dev
COPY . .
RUN mkdir -p /data/photos /store/photos
EXPOSE 7860
ENV NODE_ENV=production
ENV PORT=7860
ENV DATA_DIR=/data
ENV PHOTOS_DIR=/data/photos
ENV STORE_DIR=/store
ENV STORE_PHOTOS_DIR=/store/photos
CMD ["node", "index.js"]