
- Updated `.env` and added `.env.test` for environment variables. - Introduced API documentation in `API_DOCUMENTATION.md`. - Added authentication setup guide in `AUTHENTICATION_SETUP.md`. - Implemented user authentication with JWT and email verification. - Created new routes for user management and form submissions. - Added middleware for API key authentication and error handling. - Set up Redis for rate limiting and notifications. - Removed obsolete files and configurations related to the previous Rust implementation.
28 lines
510 B
Docker
28 lines
510 B
Docker
FROM node:18.19-alpine AS builder
|
|
|
|
WORKDIR /usr/src/app
|
|
|
|
COPY package*.json ./
|
|
RUN npm ci
|
|
|
|
COPY . .
|
|
|
|
FROM node:18.19-alpine
|
|
|
|
WORKDIR /usr/src/app
|
|
|
|
# Create a non-root user
|
|
RUN addgroup -S appgroup && adduser -S appuser -G appgroup
|
|
|
|
COPY --from=builder /usr/src/app/node_modules ./node_modules
|
|
COPY --from=builder /usr/src/app/package*.json ./
|
|
COPY --from=builder /usr/src/app/ ./
|
|
|
|
# Set ownership to non-root user
|
|
RUN chown -R appuser:appgroup /usr/src/app
|
|
|
|
USER appuser
|
|
|
|
EXPOSE 3000
|
|
|
|
CMD ["node", "server.js"] |