EL GHAFRAOUI AYOUB commited on
Commit
2c73ab2
·
1 Parent(s): 422adfc
Files changed (2) hide show
  1. Dockerfile +2 -3
  2. frontend/package.json +1 -1
Dockerfile CHANGED
@@ -49,9 +49,8 @@ WORKDIR $HOME/app
49
  # Copy the remaining application code with correct ownership
50
  COPY --chown=user . .
51
 
52
- # Expose ports for both services
53
  EXPOSE 7860
54
- EXPOSE 3000
55
 
56
- # Run FastAPI backend on 7860 and Next.js frontend on 3000
57
  CMD ["sh", "-c", "npm run start --prefix frontend & uvicorn backend.main:app --host 0.0.0.0 --port 7860"]
 
49
  # Copy the remaining application code with correct ownership
50
  COPY --chown=user . .
51
 
52
+ # Expose only FastAPI port
53
  EXPOSE 7860
 
54
 
55
+ # Run Next.js in background and FastAPI as main process
56
  CMD ["sh", "-c", "npm run start --prefix frontend & uvicorn backend.main:app --host 0.0.0.0 --port 7860"]
frontend/package.json CHANGED
@@ -3,7 +3,7 @@
3
  "version": "0.1.0",
4
  "private": true,
5
  "scripts": {
6
- "dev": "next dev",
7
  "build": "next build",
8
  "start": "next start",
9
  "lint": "next lint"
 
3
  "version": "0.1.0",
4
  "private": true,
5
  "scripts": {
6
+ "dev": "next dev -p 7860",
7
  "build": "next build",
8
  "start": "next start",
9
  "lint": "next lint"