| | |
| | FROM node:23-bookworm |
| |
|
| | |
| | RUN apt-get update && apt-get install -y \ |
| | git \ |
| | python3 \ |
| | build-essential \ |
| | ffmpeg \ |
| | && rm -rf /var/lib/apt/lists/* |
| |
|
| | |
| | ENV NODE_ENV=production |
| | ENV PORT=7860 |
| | ENV MONGO_URI=${MONGO_URI} |
| |
|
| | |
| | WORKDIR /app |
| |
|
| | |
| | RUN ln -s /usr/bin/python3 /usr/bin/python |
| |
|
| | |
| | COPY package*.json ./ |
| |
|
| | |
| | RUN npm install --omit=dev |
| |
|
| | |
| | COPY . . |
| |
|
| | |
| | RUN mkdir -p /persistent/storage && \ |
| | chmod -R 777 /persistent && \ |
| | mkdir -p /tmp/users && \ |
| | chmod -R 777 /tmp |
| |
|
| | |
| | HEALTHCHECK --interval=30s --timeout=3s \ |
| | CMD curl -f http://localhost:${PORT} || exit 1 |
| |
|
| | |
| | EXPOSE ${PORT} |
| |
|
| | |
| | CMD ["node", "server.js"] |