chore: use docker alpine build and run

This commit is contained in:
wear工程师 2023-12-08 11:21:05 +08:00
parent 854c2af9d5
commit b0766d3200

View File

@ -7,15 +7,15 @@ ENV VITE_IS_WEB_UI_MODE=true
RUN yarn install && yarn build RUN yarn install && yarn build
FROM thehale/python-poetry as build-backend FROM acidrain/python-poetry:3.12-alpine as build-backend
RUN apt update && apt install -y binutils RUN apk add binutils
WORKDIR /app WORKDIR /app
COPY ./backend /app/ COPY ./backend /app/
RUN poetry install --no-interaction RUN poetry install --no-interaction
RUN poetry run pyinstaller --clean --onefile --name backend main.py RUN poetry run pyinstaller --clean --onefile --name backend main.py
FROM debian:bookworm-slim FROM alpine:latest
ENV FASTAPI_ENV=production ENV FASTAPI_ENV=production
ENV OPENAI_API_KEY= ENV OPENAI_API_KEY=
WORKDIR /app WORKDIR /app