mirror of
https://github.com/MAGICGrants/campaign-site.git
synced 2026-01-09 12:27:59 -05:00
10
Dockerfile
10
Dockerfile
@@ -18,18 +18,14 @@ RUN \
|
|||||||
else echo "Lockfile not found." && exit 1; \
|
else echo "Lockfile not found." && exit 1; \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
# Rebuild the source code only when needed
|
# Rebuild the source code only when needed
|
||||||
FROM base AS builder
|
FROM base AS builder
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY --from=deps /app/node_modules ./node_modules
|
COPY --from=deps /app/node_modules ./node_modules
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
# Next.js collects completely anonymous telemetry data about general usage.
|
ENV SKIP_ENV_VALIDATION 1
|
||||||
# Learn more here: https://nextjs.org/telemetry
|
|
||||||
# Uncomment the following line in case you want to disable telemetry during the build.
|
|
||||||
ENV NEXT_TELEMETRY_DISABLED 1
|
ENV NEXT_TELEMETRY_DISABLED 1
|
||||||
ENV BUILD_MODE 1
|
|
||||||
ENV PRISMA_BINARY_TARGETS='["native", "rhel-openssl-1.0.x"]'
|
ENV PRISMA_BINARY_TARGETS='["native", "rhel-openssl-1.0.x"]'
|
||||||
ENV NEXT_PUBLIC_TURNSTILE_SITEKEY='0x4AAAAAAA11o5rNvbUuAWSJ'
|
ENV NEXT_PUBLIC_TURNSTILE_SITEKEY='0x4AAAAAAA11o5rNvbUuAWSJ'
|
||||||
ENV NEXT_PUBLIC_MONERO_APPLICATION_RECIPIENT='monerofund@magicgrants.org'
|
ENV NEXT_PUBLIC_MONERO_APPLICATION_RECIPIENT='monerofund@magicgrants.org'
|
||||||
@@ -52,12 +48,8 @@ WORKDIR /app
|
|||||||
|
|
||||||
RUN apk add --no-cache libc6-compat
|
RUN apk add --no-cache libc6-compat
|
||||||
|
|
||||||
ARG BUILD_MODE=1
|
|
||||||
|
|
||||||
ENV NODE_ENV production
|
ENV NODE_ENV production
|
||||||
# Uncomment the following line in case you want to disable telemetry during runtime.
|
|
||||||
ENV NEXT_TELEMETRY_DISABLED 1
|
ENV NEXT_TELEMETRY_DISABLED 1
|
||||||
ENV BUILD_MODE 1
|
|
||||||
|
|
||||||
RUN addgroup --system --gid 1001 nodejs
|
RUN addgroup --system --gid 1001 nodejs
|
||||||
RUN adduser --system --uid 1001 nextjs
|
RUN adduser --system --uid 1001 nextjs
|
||||||
|
|||||||
4
env.mjs
4
env.mjs
@@ -8,7 +8,6 @@ export const env = createEnv({
|
|||||||
* Will throw if you access these variables on the client.
|
* Will throw if you access these variables on the client.
|
||||||
*/
|
*/
|
||||||
server: {
|
server: {
|
||||||
BUILD_MODE: z.boolean(),
|
|
||||||
APP_URL: z.string().url(),
|
APP_URL: z.string().url(),
|
||||||
NEXTAUTH_SECRET: z.string().min(32),
|
NEXTAUTH_SECRET: z.string().min(32),
|
||||||
USER_SETTINGS_JWT_SECRET: z.string().min(32),
|
USER_SETTINGS_JWT_SECRET: z.string().min(32),
|
||||||
@@ -80,7 +79,6 @@ export const env = createEnv({
|
|||||||
* 💡 You'll get type errors if not all variables from `server` & `client` are included here.
|
* 💡 You'll get type errors if not all variables from `server` & `client` are included here.
|
||||||
*/
|
*/
|
||||||
runtimeEnv: {
|
runtimeEnv: {
|
||||||
BUILD_MODE: !!process.env.BUILD_MODE,
|
|
||||||
APP_URL: process.env.APP_URL,
|
APP_URL: process.env.APP_URL,
|
||||||
NEXTAUTH_SECRET: process.env.NEXTAUTH_SECRET,
|
NEXTAUTH_SECRET: process.env.NEXTAUTH_SECRET,
|
||||||
USER_SETTINGS_JWT_SECRET: process.env.USER_SETTINGS_JWT_SECRET,
|
USER_SETTINGS_JWT_SECRET: process.env.USER_SETTINGS_JWT_SECRET,
|
||||||
@@ -149,5 +147,5 @@ export const env = createEnv({
|
|||||||
* Run `build` or `dev` with `SKIP_ENV_VALIDATION` to skip env validation. This is especially
|
* Run `build` or `dev` with `SKIP_ENV_VALIDATION` to skip env validation. This is especially
|
||||||
* useful for Docker builds.
|
* useful for Docker builds.
|
||||||
*/
|
*/
|
||||||
skipValidation: !!process.env.BUILD_MODE,
|
skipValidation: !!process.env.SKIP_ENV_VALIDATION,
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
"start": "next start",
|
"start": "next start",
|
||||||
"lint": "next lint",
|
"lint": "next lint",
|
||||||
"watch": "npm-watch",
|
"watch": "npm-watch",
|
||||||
"sentry:sourcemaps": "sentry-cli sourcemaps inject --org magic-grants --project campaign-site ./out && sentry-cli sourcemaps upload --org magic-grants --project campaign-site ./out"
|
"sentry:sourcemaps": "tsc && sentry-cli sourcemaps inject --org magic-grants --project campaign-site ./out && sentry-cli sourcemaps upload --org magic-grants --project campaign-site ./out"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@fortawesome/fontawesome-svg-core": "^6.5.2",
|
"@fortawesome/fontawesome-svg-core": "^6.5.2",
|
||||||
@@ -127,4 +127,4 @@
|
|||||||
"extensions": "js,jsx,tsx,ts,css,scss,md"
|
"extensions": "js,jsx,tsx,ts,css,scss,md"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user