KLEINUILTIES-WEBAPP/Dockerfile
Slim Uiltjies App 1939bf2ef4 Initial commit: Slim Uiltjies AfterCare invoice system
- Progressive Web App with Express + JSON backend
- PIN-based auth, multi-device sync
- Invoice + Statement PDF generation (branded, Grandstander + Nunito)
- Mobile + Desktop responsive layouts
- n8n backup integration
- Custom logo upload
- Settings for business info, fees, banking
- Bulk invoice generation
- Web Share API integration
2026-08-08 09:25:17 +02:00

29 lines
766 B
Docker

FROM node:20-alpine
# Create app directory and data directory for the persistent volume
WORKDIR /app
RUN mkdir -p /data
# Install dependencies (cached layer)
COPY package.json ./
RUN npm install --omit=dev --no-audit --no-fund && npm cache clean --force
# Copy the rest of the app
COPY . .
# Defaults — override these in Coolify's Environment section
ENV PORT=3000 \
DATA_FILE=/data/data.json \
NODE_ENV=production
EXPOSE 3000
# Healthcheck for Coolify / orchestrators
HEALTHCHECK --interval=30s --timeout=3s --start-period=10s --retries=3 \
CMD wget -q --spider http://localhost:3000/api/health || exit 1
# Run as non-root for safety
RUN addgroup -S app && adduser -S app -G app && chown -R app:app /app /data
USER app
CMD ["node", "server.js"]