mirror of
https://github.com/sct/overseerr.git
synced 2025-09-17 17:24:35 +02:00
build: fix production build
This commit is contained in:
@@ -16,12 +16,12 @@ const prodConfig = {
|
|||||||
database: 'config/db/db.sqlite3',
|
database: 'config/db/db.sqlite3',
|
||||||
synchronize: false,
|
synchronize: false,
|
||||||
logging: false,
|
logging: false,
|
||||||
entities: ['dist/server/entity/**/*.js'],
|
entities: ['dist/entity/**/*.js'],
|
||||||
migrations: ['dist/server/migration/**/*.js'],
|
migrations: ['dist/migration/**/*.js'],
|
||||||
migrationsRun: true,
|
migrationsRun: true,
|
||||||
cli: {
|
cli: {
|
||||||
entitiesDir: 'dist/server/entity',
|
entitiesDir: 'dist/entity',
|
||||||
migrationsDir: 'dist/server/migration',
|
migrationsDir: 'dist/migration',
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -14,17 +14,16 @@ import { Session } from './entity/Session';
|
|||||||
import { getSettings } from './lib/settings';
|
import { getSettings } from './lib/settings';
|
||||||
import logger from './logger';
|
import logger from './logger';
|
||||||
|
|
||||||
const API_SPEC_PATH = path.join(__dirname, 'overseerr-api.yml');
|
const API_SPEC_PATH = path.join(__dirname, '../overseerr-api.yml');
|
||||||
|
|
||||||
const dev = process.env.NODE_ENV !== 'production';
|
const dev = process.env.NODE_ENV !== 'production';
|
||||||
const app = next({ dev });
|
const app = next({ dev });
|
||||||
const handle = app.getRequestHandler();
|
const handle = app.getRequestHandler();
|
||||||
|
|
||||||
createConnection();
|
|
||||||
|
|
||||||
app
|
app
|
||||||
.prepare()
|
.prepare()
|
||||||
.then(async () => {
|
.then(async () => {
|
||||||
|
await createConnection();
|
||||||
// Load Settings
|
// Load Settings
|
||||||
getSettings().load();
|
getSettings().load();
|
||||||
|
|
||||||
|
@@ -1,6 +1,8 @@
|
|||||||
{
|
{
|
||||||
"extends": "../tsconfig.json",
|
"extends": "../tsconfig.json",
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
|
"target": "ES2019",
|
||||||
|
"lib": ["ES2019"],
|
||||||
"module": "commonjs",
|
"module": "commonjs",
|
||||||
"outDir": "../dist",
|
"outDir": "../dist",
|
||||||
"noEmit": false
|
"noEmit": false
|
||||||
|
Reference in New Issue
Block a user