build(backend): add production Dockerfile
This commit is contained in:
1 parent
877df963f9
commit
07cf643b33
2 files changed
+30
No files matched your search
@@ -0,0 +1,22 @@
|
||||
FROM node:24-alpine
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Installe uniquement les dépendances de production.
|
||||
COPY package.json ./
|
||||
RUN npm install --omit=dev --no-audit --no-fund
|
||||
|
||||
COPY src ./src
|
||||
|
||||
ENV NODE_ENV=production
|
||||
ENV HOST=0.0.0.0
|
||||
ENV PORT=3000
|
||||
ENV DB_PATH=/data/jarvise.db
|
||||
|
||||
VOLUME ["/data"]
|
||||
EXPOSE 3000
|
||||
|
||||
HEALTHCHECK --interval=30s --timeout=5s --start-period=5s \
|
||||
CMD wget -qO- http://127.0.0.1:3000/health || exit 1
|
||||
|
||||
CMD ["node", "src/server.js"]
|
||||
Reference in new issue
Block a user