Add Dokploy-specific Dockerfile and update docs

This commit is contained in:
Jonas
2025-09-20 17:27:27 +02:00
parent dc53aff75d
commit aa0711102d
2 changed files with 48 additions and 5 deletions

29
Dockerfile.dokploy Normal file
View File

@@ -0,0 +1,29 @@
# Production-ready Dockerfile for Dokploy deployments
# Use a Debian-based Node image to ensure native modules such as bcrypt have prebuilt binaries available.
FROM node:20-slim AS base
# Create application directory inside the container
WORKDIR /app/backend
# Set production environment variables inside the image.
ENV NODE_ENV=production \
PORT=3000
# Install only the production dependencies defined in the backend package.json.
COPY backend/package*.json ./
RUN npm ci --omit=dev \
&& npm cache clean --force
# Copy backend source code and the static frontend bundle into the container.
COPY backend/src ./src
COPY frontend ../frontend
# Use the non-root "node" user that is precreated in the base image.
RUN chown -R node:node /app
USER node
# Expose the HTTP port used by the Express server.
EXPOSE 3000
# Start the Express API / Socket.IO server.
CMD ["node", "src/server.js"]