Add optional `updated_at` field to the Project interface for tracking last modification. Update base URL to use an environment variable for better configurability. Improve error handling during sitemap data fetching by logging errors and returning static routes as a fallback. Refactor change frequency and priority logic for clarity and maintainability.
27 lines
472 B
Docker
27 lines
472 B
Docker
# Use Node.js LTS image as the base
|
|
FROM node:current-alpine
|
|
|
|
# Set working directory
|
|
WORKDIR /app
|
|
|
|
# Copy package.json and package-lock.json
|
|
COPY package*.json ./
|
|
|
|
# Install dependencies
|
|
RUN npm install
|
|
|
|
# Copy the application code
|
|
COPY . .
|
|
|
|
# Build the Next.js application
|
|
RUN npm run build
|
|
|
|
# Set environmental variable for production mode
|
|
ENV NODE_ENV=production
|
|
|
|
# Expose the port the app runs on
|
|
EXPOSE 3000
|
|
|
|
# Run the app with the start script
|
|
CMD ["npm", "start"]
|