add skip env validation

This commit is contained in:
Brandon Egger 2024-02-21 16:48:08 -06:00
parent 92d18426b9
commit c487bbe003
2 changed files with 2 additions and 14 deletions

View File

@ -19,22 +19,14 @@ RUN npm install
# PRODUCTION BUILDER # PRODUCTION BUILDER
################################################# #################################################
FROM base AS builder-production FROM base AS builder-production
ARG DATABASE_URL
ARG NEXTAUTH_URL
ARG NEXTAUTH_SECRET
ARG JWT_SECRET
ENV DATABASE_URL ${DATABASE_URL}
ENV NEXTAUTH_URL ${NEXTAUTH_URL}
ENV NEXTAUTH_SECRET ${NEXTAUTH_SECRET}
ENV JWT_SECRET ${JWT_SECRET}
ENV NODE_ENV=production ENV NODE_ENV=production
WORKDIR /app WORKDIR /app
COPY --from=deps /app/node_modules ./node_modules COPY --from=deps /app/node_modules ./node_modules
COPY . . COPY . .
RUN npm run build RUN SKIP_ENV_VALIDATION=1 npm run build
################################################# #################################################
# PRODUCTION RUNNER # PRODUCTION RUNNER

View File

@ -5,11 +5,7 @@ services:
build: build:
context: . context: .
args: args:
- NEXTAUTH_SECRET=arbitrary - RUNNER_ENV
- JWT_SECRET=arbitrary
- NEXTAUTH_URL=http://arbitrary.com
- DATABASE_URL=http://arbitrary.com
- RUNNER_ENV=production
restart: always restart: always
ports: ports:
- "1234:3000" - "1234:3000"