- Added a new `api` service for the NestJS backend, including health checks and dependencies on PostgreSQL, Redis, and MinIO. - Introduced PostgreSQL and Redis services with health checks and configurations for data persistence. - Added MinIO for S3-compatible object storage and a one-shot service to initialize required buckets. - Updated the Nginx configuration to proxy requests to the new backend API and MinIO storage. - Enhanced the Dockerfile to support the new API environment variables and configurations. - Updated the `package.json` and `package-lock.json` to include new dependencies for QR code generation and other utilities. Co-authored-by: Cursor <cursoragent@cursor.com>
112 lines
3.7 KiB
TypeScript
112 lines
3.7 KiB
TypeScript
import { Module } from '@nestjs/common';
|
|
import { AppController } from './app.controller';
|
|
import { AppService } from './app.service';
|
|
import { ConfigModule } from '@nestjs/config';
|
|
import { AuthModule } from './auth/auth.module';
|
|
import { UsersModule } from './users/users.module';
|
|
import { DatabaseModule } from './database/database.module';
|
|
import { UploadModule } from './upload/upload.module';
|
|
import { FilmmakersModule } from './filmmakers/filmmakers.module';
|
|
import { WaitlistModule } from './waitlist/waitlist.module';
|
|
import { PaymentModule } from './payment/payment.module';
|
|
import { ScheduleModule } from '@nestjs/schedule';
|
|
import { InvitesModule } from './invites/invites.module';
|
|
import { MailModule } from './mail/mail.module';
|
|
import { MigrationModule } from './migration/migration.module';
|
|
import { SubscriptionsModule } from './subscriptions/subscriptions.module';
|
|
import { AwardIssuersModule } from './award-issuers/award-issuers.module';
|
|
import { FestivalsModule } from './festivals/festivals.module';
|
|
import { GenresModule } from './genres/genres.module';
|
|
import { CacheInterceptor, CacheModule } from '@nestjs/cache-manager';
|
|
import { APP_FILTER, APP_INTERCEPTOR } from '@nestjs/core';
|
|
import { RentsModule } from './rents/rents.module';
|
|
import { EventsModule } from './events/events.module';
|
|
import { WebhooksModule } from './webhooks/webhook.module';
|
|
import { ProjectsModule } from './projects/projects.module';
|
|
import { ContentsModule } from './contents/contents.module';
|
|
import { GlobalFilter } from './common/filter/error-exception.filter';
|
|
import { RssModule } from './rss/rss.module';
|
|
import { ThrottlerModule } from '@nestjs/throttler';
|
|
import { TranscodingServerModule } from './transcoding-server/transcoding-server.module';
|
|
import { BullModule } from '@nestjs/bullmq';
|
|
// Sentry removed -- use self-hosted error tracking later
|
|
import { PostHogModule } from './posthog/posthog.module';
|
|
import { SecretsManagerModule } from './secrets-manager/secrets-manager.module';
|
|
import { DRMModule } from './drm/drm.module';
|
|
import { AdminModule } from './admin/admin.module';
|
|
import { SeasonModule } from './season/season.module';
|
|
import { DiscountsModule } from './discounts/discounts.module';
|
|
import { DiscountRedemptionModule } from './discount-redemption/discount-redemption.module';
|
|
import { NostrAuthModule } from './nostr-auth/nostr-auth.module';
|
|
import { LibraryModule } from './library/library.module';
|
|
|
|
@Module({
|
|
imports: [
|
|
CacheModule.register({
|
|
isGlobal: true,
|
|
ttl: 30,
|
|
max: 100,
|
|
}),
|
|
ThrottlerModule.forRoot([
|
|
{
|
|
ttl: 60_000,
|
|
limit: 100,
|
|
},
|
|
]),
|
|
BullModule.forRootAsync({
|
|
useFactory: () => ({
|
|
connection: {
|
|
host: process.env.QUEUE_HOST,
|
|
port: Number.parseInt(process.env.QUEUE_PORT, 10),
|
|
password: process.env.QUEUE_PASSWORD,
|
|
},
|
|
}),
|
|
}),
|
|
ConfigModule.forRoot(),
|
|
ScheduleModule.forRoot(),
|
|
MailModule,
|
|
PaymentModule,
|
|
DatabaseModule,
|
|
AuthModule,
|
|
UsersModule,
|
|
UploadModule,
|
|
ProjectsModule,
|
|
ContentsModule,
|
|
FilmmakersModule,
|
|
WaitlistModule,
|
|
InvitesModule,
|
|
MigrationModule,
|
|
SubscriptionsModule,
|
|
AwardIssuersModule,
|
|
FestivalsModule,
|
|
GenresModule,
|
|
RentsModule,
|
|
EventsModule,
|
|
WebhooksModule,
|
|
RssModule,
|
|
TranscodingServerModule,
|
|
PostHogModule,
|
|
SecretsManagerModule,
|
|
DRMModule,
|
|
AdminModule,
|
|
SeasonModule,
|
|
DiscountsModule,
|
|
DiscountRedemptionModule,
|
|
NostrAuthModule,
|
|
LibraryModule,
|
|
],
|
|
controllers: [AppController],
|
|
providers: [
|
|
AppService,
|
|
{
|
|
provide: APP_INTERCEPTOR,
|
|
useClass: CacheInterceptor,
|
|
},
|
|
{
|
|
provide: APP_FILTER,
|
|
useClass: GlobalFilter,
|
|
},
|
|
],
|
|
})
|
|
export class AppModule {}
|