Backup: 2025-06-07 19:48 - Script test

[Restore from backup: vip-coordinator-backup-2025-06-07-19-48-script-test]
This commit is contained in:
2025-06-07 19:48:00 +02:00
parent 8fb00ec041
commit dc4655cef4
103 changed files with 16396 additions and 6143 deletions

View File

@@ -15,7 +15,32 @@ CMD ["npm", "run", "dev"]
# Production stage
FROM base AS production
# Install dependencies (including dev dependencies for build)
RUN npm install
# Copy source code
COPY . .
# Build the application
RUN npx tsc --version && npx tsc
# Remove dev dependencies to reduce image size
RUN npm prune --omit=dev
# Create non-root user for security
RUN addgroup -g 1001 -S nodejs && \
adduser -S nodejs -u 1001
# Change ownership of the app directory
RUN chown -R nodejs:nodejs /app
USER nodejs
# Health check
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
CMD node -e "require('http').get('http://localhost:3000/api/health', (res) => { process.exit(res.statusCode === 200 ? 0 : 1) })" || exit 1
EXPOSE 3000
CMD ["npm", "run", "dev"]
# Start the production server
CMD ["npm", "start"]