Skip to content

Commit

Permalink
Fix static file dir in the dev builds (#415)
Browse files Browse the repository at this point in the history
  • Loading branch information
msm-cert authored Oct 2, 2024
1 parent 54f36d3 commit 015a887
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
15 changes: 3 additions & 12 deletions deploy/docker/dev.web.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,20 +1,11 @@
FROM node:18 AS build

RUN npm install -g serve
COPY src/mqueryfront /app
WORKDIR /app
RUN npm install --legacy-peer-deps && npm run build

FROM python:3.10

WORKDIR /usr/src/app/src

RUN apt update; apt install -y cmake

# mquery and plugin requirements
COPY requirements.txt src/plugins/requirements-*.txt /tmp/
RUN ls /tmp/requirements*.txt | xargs -i,, pip --no-cache-dir install -r ,,

COPY requirements.txt setup.py MANIFEST.in /usr/src/app/
COPY src /usr/src/app/src/
COPY --from=build "/app/dist" "/usr/src/app/src/mqueryfront/dist"
RUN pip3 install /usr/src/app
CMD uvicorn mquery.app:app --host 0.0.0.0 --port 5000 --reload
CMD pip install -e /usr/src/app && uvicorn mquery.app:app --host 0.0.0.0 --port 5000 --reload
1 change: 1 addition & 0 deletions src/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -595,6 +595,7 @@ def serve_index_sub() -> FileResponse:
directory=os.path.join(
os.path.dirname(__file__), "mqueryfront", "dist"
),
check_dir=False,
html=True,
),
)
Expand Down

0 comments on commit 015a887

Please sign in to comment.