mirror of
https://github.com/MAGICGrants/campaign-site.git
synced 2026-01-09 12:27:59 -05:00
chore: make it skip env validation on build
This commit is contained in:
@@ -71,6 +71,7 @@ WORKDIR /app
|
||||
EXPOSE 3000
|
||||
|
||||
ENV PORT 3000
|
||||
ENV HOSTNAME "0.0.0.0"
|
||||
|
||||
# Install Prisma CLI
|
||||
RUN mkdir /home/nextjs/.npm-global
|
||||
@@ -82,4 +83,4 @@ RUN npm cache clean --force
|
||||
|
||||
# server.js is created by next build from the standalone output
|
||||
# https://nextjs.org/docs/pages/api-reference/next-config-js/output
|
||||
CMD ["/bin/sh", "-c", "prisma migrate deploy && HOSTNAME='0.0.0.0' node server.js"]
|
||||
CMD ["/bin/sh", "-c", "prisma migrate deploy && node server.js"]
|
||||
5
env.mjs
5
env.mjs
@@ -95,4 +95,9 @@ export const env = createEnv({
|
||||
SENDGRID_VERIFIED_SENDER: process.env.SENDGRID_VERIFIED_SENDER,
|
||||
SENDGRID_API_KEY: process.env.SENDGRID_API_KEY,
|
||||
},
|
||||
/**
|
||||
* Run `build` or `dev` with `SKIP_ENV_VALIDATION` to skip env validation. This is especially
|
||||
* useful for Docker builds.
|
||||
*/
|
||||
skipValidation: !!process.env.SKIP_ENV_VALIDATION,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user