feat: add frontend build step
This commit is contained in:
parent
d340a5d704
commit
d271e245a0
25
Dockerfile
Normal file
25
Dockerfile
Normal file
@ -0,0 +1,25 @@
|
||||
#
|
||||
# Frontend Build
|
||||
FROM node:lts AS build
|
||||
WORKDIR /app
|
||||
COPY package*.json ./
|
||||
RUN npm install
|
||||
COPY frontend/ .
|
||||
RUN npm run build
|
||||
|
||||
#
|
||||
# Server Build
|
||||
FROM simulationcraftorg/simc:latest
|
||||
ENV LANG=de_DE.UTF-8
|
||||
RUN apk add --no-cache python3 py3-pip git
|
||||
ENV VIRTUAL_ENV=/opt/venv
|
||||
RUN python3 -m venv $VIRTUAL_ENV
|
||||
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
|
||||
# Install dependencies:
|
||||
COPY requirements.txt .
|
||||
RUN pip install -r requirements.txt
|
||||
COPY backend/ .
|
||||
COPY --from=build /app/out ./templates
|
||||
EXPOSE 8000
|
||||
ENTRYPOINT []
|
||||
CMD ["fastapi", "run", "main.py", "--port", "8000"]
|
Loading…
x
Reference in New Issue
Block a user