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
#################################################
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
WORKDIR /app
COPY --from=deps /app/node_modules ./node_modules
COPY . .
RUN npm run build
RUN SKIP_ENV_VALIDATION=1 npm run build
#################################################
# PRODUCTION RUNNER

View File

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