fix: Docker compose build for production

This commit is contained in:
Aleksi Lassila
2024-04-20 02:38:30 +03:00
parent 8928155447
commit 35688dd72c
7 changed files with 16 additions and 11 deletions

0
backend/config/.gitkeep Normal file
View File

View File

@@ -13,7 +13,7 @@ import { join } from 'path';
UserModule,
AuthModule,
ServeStaticModule.forRoot({
rootPath: join(__dirname, '..', '..', 'dist'),
rootPath: join(__dirname, 'dist'),
}),
],
controllers: [AppController],

View File

@@ -8,7 +8,7 @@ export const databaseProviders = [
useFactory: async () => {
const dataSource = new DataSource({
type: 'sqlite',
database: './reiverr.sqlite',
database: './config/reiverr.sqlite',
entities: [__dirname + '/../**/*.entity{.ts,.js}'],
synchronize: true,
});

View File

@@ -3,7 +3,7 @@ import { AppModule } from './app.module';
import 'reflect-metadata';
import { DocumentBuilder, SwaggerModule } from '@nestjs/swagger';
import * as fs from 'fs';
import * as proxy from 'express-http-proxy';
// import * as proxy from 'express-http-proxy';
async function bootstrap() {
const app = await NestFactory.create(AppModule);
@@ -20,6 +20,6 @@ async function bootstrap() {
SwaggerModule.setup('openapi', app, document);
fs.writeFileSync('./swagger-spec.json', JSON.stringify(document));
await app.listen(3000);
await app.listen(9494);
}
bootstrap();