1
0
forked from Yara724/api

ServeRoot fixing on WORKDIR

This commit is contained in:
2026-06-19 15:05:35 +03:30
parent 4d6183fa24
commit f4301428c7

View File

@@ -32,7 +32,11 @@ import { AppConfigModule } from "./core/config/config.module";
DatabaseModule,
CronModule,
ServeStaticModule.forRoot({
rootPath: join(__dirname, "..", "files"),
// process.cwd() is always the project/container root (/app in Docker),
// so the volume-mounted /app/files is resolved correctly regardless of
// where the compiled dist files live (__dirname would resolve to
// /app/dist/src because TypeScript preserves the src/ prefix in outDir).
rootPath: join(process.cwd(), "files"),
serveRoot: "/files",
}),
UsersModule,