feat(sitemap): update base URL and add build environment handling
Change the base URL from localhost to the production URL. Implement a check for the build environment to use mock data for generating the sitemap during the build process. This ensures that sitemap is correctly populated with project routes even when the API is not available.
This commit is contained in:
@@ -13,9 +13,15 @@ RUN npm install
|
||||
# Copy the application code
|
||||
COPY . .
|
||||
|
||||
# Set IS_BUILD environment variable for build process
|
||||
ENV IS_BUILD=true
|
||||
|
||||
# Build the Next.js application
|
||||
RUN npm run build
|
||||
|
||||
# Unset IS_BUILD environment variable for runtime
|
||||
ENV IS_BUILD=false
|
||||
|
||||
# Set environmental variable for production mode
|
||||
ENV NODE_ENV=production
|
||||
|
||||
@@ -23,4 +29,4 @@ ENV NODE_ENV=production
|
||||
EXPOSE 3000
|
||||
|
||||
# Run the app with the start script
|
||||
CMD ["npm", "start"]
|
||||
CMD ["npm", "start"]s
|
||||
|
||||
Reference in New Issue
Block a user