Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
**/dist
**/node_modules
**/uploads/*
!**/uploads/**/.gitkeep
.env
.env.*
*.log
Expand Down
3 changes: 1 addition & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,7 @@ COPY packages/database/prisma packages/database/prisma
COPY packages/database/prisma.config.ts packages/database/prisma.config.ts
COPY scripts/start-api.sh scripts/start-api.sh

RUN mkdir -p apps/api/uploads/profile-pictures apps/api/uploads/project-media \
&& chmod +x scripts/start-api.sh
RUN chmod +x scripts/start-api.sh

EXPOSE 3001

Expand Down
7 changes: 2 additions & 5 deletions apps/api/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,5 @@ pids
# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Uploaded files (locally-stored profile pictures, etc.)
/uploads/*
!/uploads/profile-pictures
/uploads/profile-pictures/*
!/uploads/profile-pictures/.gitkeep
# Legacy local uploads are runtime data and must never be committed.
/uploads/
9 changes: 1 addition & 8 deletions apps/api/src/main.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
import { join } from 'path';
import { NestFactory } from '@nestjs/core';
import type { NestExpressApplication } from '@nestjs/platform-express';
import cookieParser from 'cookie-parser';
import { AppModule } from './app.module';
import { setupSwagger } from './swagger';

async function bootstrap() {
const app = await NestFactory.create<NestExpressApplication>(AppModule);
const app = await NestFactory.create(AppModule);

// Enable cookie parsing for session management
app.use(cookieParser());
Expand All @@ -16,11 +14,6 @@ async function bootstrap() {
credentials: true,
});

// Serve locally-uploaded files (e.g. profile pictures)
app.useStaticAssets(join(process.cwd(), 'uploads'), {
prefix: '/uploads/',
});

setupSwagger(app);

const configuredPort = Number.parseInt(process.env.PORT ?? '3001', 10);
Expand Down
Empty file.
Loading