electro-sb commited on
Commit
b251cc9
·
1 Parent(s): c403731

Adjust Dockerfile and FastAPI to serve frontend from /dist

Browse files
Files changed (2) hide show
  1. Dockerfile +1 -2
  2. chess_engine/api/rest_api.py +1 -1
Dockerfile CHANGED
@@ -37,8 +37,7 @@ RUN apt-get update && \
37
  WORKDIR /app
38
 
39
  # Copy the frontend code and dependencies
40
- COPY --from=frontend-builder /app/frontend/web/dist/ ./web/dist/
41
- RUN chmod -R 777 ./web
42
 
43
  # Copy the installed Python dependencies
44
  COPY --from=backend-builder /usr/local/lib/python3.11/site-packages/ /usr/local/lib/python3.11/site-packages/
 
37
  WORKDIR /app
38
 
39
  # Copy the frontend code and dependencies
40
+ COPY --from=frontend-builder /app/frontend/web/dist/ ./dist/
 
41
 
42
  # Copy the installed Python dependencies
43
  COPY --from=backend-builder /usr/local/lib/python3.11/site-packages/ /usr/local/lib/python3.11/site-packages/
chess_engine/api/rest_api.py CHANGED
@@ -70,7 +70,7 @@ app = FastAPI(
70
  )
71
 
72
  # Mount static files
73
- app.mount("/", StaticFiles(directory="./web/dist", html=True), name="static")
74
 
75
  # Game controller instance
76
  game_controller = GameController()
 
70
  )
71
 
72
  # Mount static files
73
+ app.mount("/", StaticFiles(directory="./dist", html=True), name="static")
74
 
75
  # Game controller instance
76
  game_controller = GameController()