pull/1233/head
parent
a37dd6180b
commit
10fb001d04
|
@ -25,7 +25,6 @@ ENV DISABLE_LOGIN $DISABLE_LOGIN
|
|||
ENV NEXT_TELEMETRY_DISABLED 1
|
||||
|
||||
RUN yarn build
|
||||
|
||||
# Production image, copy all the files and run next
|
||||
FROM node:16-alpine AS runner
|
||||
WORKDIR /app
|
||||
|
@ -36,8 +35,10 @@ ENV NEXT_TELEMETRY_DISABLED 1
|
|||
RUN addgroup --system --gid 1001 nodejs
|
||||
RUN adduser --system --uid 1001 nextjs
|
||||
|
||||
RUN yarn global add prisma
|
||||
RUN yarn global add prisma @prisma/client npm-run-all
|
||||
|
||||
# Copy Scripts to the production
|
||||
COPY --from=builder /app/scripts/check-db-bundle.js ./scripts/check-db.js
|
||||
# You only need to copy next.config.js if you are NOT using the default configuration
|
||||
COPY --from=builder /app/next.config.js ./
|
||||
COPY --from=builder /app/public ./public
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
},
|
||||
"scripts": {
|
||||
"dev": "next dev",
|
||||
"build": "npm-run-all build-tracker build-geo build-db build-app",
|
||||
"build": "npm-run-all build-tracker build-checkdb build-geo build-db build-app",
|
||||
"start": "npm-run-all check-db start-next",
|
||||
"start-docker": "npm-run-all check-db start-server",
|
||||
"start-env": "node -r dotenv/config scripts/start-env.js",
|
||||
|
@ -19,6 +19,7 @@
|
|||
"start-next": "next start",
|
||||
"build-app": "next build",
|
||||
"build-tracker": "rollup -c rollup.tracker.config.js",
|
||||
"build-checkdb": "rollup -c rollup.checkdb.config.js",
|
||||
"build-db": "npm-run-all copy-db-files build-db-client",
|
||||
"build-lang": "npm-run-all format-lang compile-lang",
|
||||
"build-geo": "node scripts/build-geo.js",
|
||||
|
@ -102,6 +103,8 @@
|
|||
"devDependencies": {
|
||||
"@formatjs/cli": "^4.2.29",
|
||||
"@rollup/plugin-buble": "^0.21.3",
|
||||
"@rollup/plugin-commonjs": "^22.0.1",
|
||||
"@rollup/plugin-node-resolve": "^13.3.0",
|
||||
"@svgr/webpack": "^6.2.1",
|
||||
"cross-env": "^7.0.3",
|
||||
"eslint": "^7.32.0",
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
import commonjs from "@rollup/plugin-commonjs";
|
||||
import { nodeResolve } from '@rollup/plugin-node-resolve';
|
||||
export default {
|
||||
input: 'scripts/check-db.js',
|
||||
output: {
|
||||
file: 'scripts/check-db-bundle.js',
|
||||
format: 'cjs',
|
||||
},
|
||||
plugins: [commonjs(),nodeResolve()],
|
||||
};
|
|
@ -1,8 +1,9 @@
|
|||
require('dotenv').config();
|
||||
import dotenv from 'dotenv';
|
||||
dotenv.config();
|
||||
const { PrismaClient } = require('@prisma/client');
|
||||
const prisma = new PrismaClient();
|
||||
const chalk = require('chalk');
|
||||
const spawn = require('cross-spawn');
|
||||
import chalk from 'chalk';
|
||||
import spawn from 'cross-spawn';
|
||||
|
||||
let message = '';
|
||||
const updateMessage = `To update your database, you need to run:\n${chalk.bold.whiteBright(
|
||||
|
|
Loading…
Reference in New Issue