This commit is contained in:
Zheyuan Wu
2025-10-24 00:51:57 -05:00
parent ac91a4bb95
commit d8096410af
2 changed files with 70 additions and 0 deletions

View File

@@ -1,3 +1,5 @@
# Dockerfile for CSE folders
# Source: https://github.com/vercel/next.js/blob/canary/examples/with-docker-multi-env/docker/production/Dockerfile
# syntax=docker.io/docker/dockerfile:1
@@ -27,6 +29,10 @@ WORKDIR /app
COPY --from=deps /app/node_modules ./node_modules
COPY . .
# 2.1 Remove unnecessary files for build with title not starting with CSE
RUN find ./content -type d -not -name "CSE*" -exec rm -rf {} +
RUN find ./public -type f -not -name "*.md" -exec rm -rf {} +
# This will do the trick, use the corresponding env file for each environment.
# COPY .env.production.sample .env.production
RUN npm run build