diff --git a/Dockerfile.dev b/Dockerfile.dev index 2a643d0..e4be1c7 100644 --- a/Dockerfile.dev +++ b/Dockerfile.dev @@ -18,6 +18,12 @@ RUN bunx prisma generate # Uncomment the following line in case you want to disable telemetry during the build. ENV NEXT_TELEMETRY_DISABLED=1 +ARG GIT_SHA=unknown +ARG APP_VERSION=0.0.0 +ARG DEPLOY_ENV=production +ENV NEXT_PUBLIC_GIT_SHA=$GIT_SHA \ + NEXT_PUBLIC_APP_VERSION=$APP_VERSION \ + NEXT_PUBLIC_DEPLOY_ENV=$DEPLOY_ENV ARG DATABASE_URL ENV DATABASE_URL=$DATABASE_URL @@ -33,6 +39,12 @@ ENV NEXT_TELEMETRY_DISABLED=1 ENV NODE_ENV=production \ PORT=3000 \ HOSTNAME="0.0.0.0" +ARG GIT_SHA=unknown +ARG APP_VERSION=0.0.0 +ARG DEPLOY_ENV=production +ENV NEXT_PUBLIC_GIT_SHA=$GIT_SHA \ + NEXT_PUBLIC_APP_VERSION=$APP_VERSION \ + NEXT_PUBLIC_DEPLOY_ENV=$DEPLOY_ENV RUN groupadd --system --gid 1001 nodejs && \ useradd --system --uid 1001 --no-log-init -g nodejs nextjs diff --git a/Dockerfile.prod b/Dockerfile.prod index 3d518b4..e4be1c7 100644 --- a/Dockerfile.prod +++ b/Dockerfile.prod @@ -14,7 +14,6 @@ FROM base AS builder WORKDIR /app COPY --from=deps /app/node_modules ./node_modules COPY . . -# RUN bunx prisma migrate deploy RUN bunx prisma generate # Uncomment the following line in case you want to disable telemetry during the build.