From 48695c964a1c68e216d399d4e48463b304884413 Mon Sep 17 00:00:00 2001 From: leehk Date: Thu, 17 Apr 2025 12:43:11 +0800 Subject: [PATCH] update working --- .github/workflows/build.yml | 2 +- app/backend/Dockerfile.prod | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 33eea3f..ce6a484 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,4 +1,4 @@ -name: Build +name: Build + CI # Triggers: Equivalent to ADO trigger block on: diff --git a/app/backend/Dockerfile.prod b/app/backend/Dockerfile.prod index bb47d1e..a6571a6 100644 --- a/app/backend/Dockerfile.prod +++ b/app/backend/Dockerfile.prod @@ -11,6 +11,8 @@ WORKDIR /usr/src/app # set environment variables ENV PYTHONDONTWRITEBYTECODE=1 ENV PYTHONUNBUFFERED=1 +ENV ENVIRONMENT=dev +ENV TESTING=1 # install python dependencies RUN pip install -i https://pypi.tuna.tsinghua.edu.cn/simple pipenv && rm -rf ~/.cache/pip @@ -20,10 +22,9 @@ RUN pipenv install --deploy --dev # add app COPY . /usr/src/app RUN pipenv run pytest tests --disable-warnings -# RUN pipenv run pip install black==23.12.1 flake8==7.0.0 isort==5.13.2 -# RUN pipenv run flake8 . -# RUN pipenv run black --exclude=migrations . --check -# RUN pipenv run isort . --check-only +RUN pipenv run flake8 . +RUN pipenv run black --exclude=migrations . --check +RUN pipenv run isort . --check-only ######### # FINAL # @@ -54,6 +55,7 @@ ENV TESTING=0 # install python dependencies RUN pip install -i https://pypi.tuna.tsinghua.edu.cn/simple pipenv && rm -rf ~/.cache/pip +COPY --from=builder /usr/src/app/Pipfile . RUN pipenv install --deploy RUN pipenv run pip install "uvicorn[standard]==0.26.0"