Skip to content

Commit

Permalink
successfully converted to poetry
Browse files Browse the repository at this point in the history
  • Loading branch information
DonHaul committed Oct 15, 2024
1 parent c68e4fc commit 1600a3c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/build-and-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,13 @@ jobs:
- name: Prep Build
uses: docker/setup-buildx-action@v3
- name: Build Docker image
run: docker build -t refextract .
run: docker build --target refextract-tests -t refextract .
- name: Run tests
run: docker run refextract /bin/bash -c "pip install refextract[tests] && pytest ."
run: >
docker run
--entrypoint poetry
refextract
run pytest
push_and_deploy:
runs-on: ubuntu-latest
needs: [lint_and_test]
Expand Down
9 changes: 7 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.11.6-slim-bullseye AS python
FROM python:3.11.6-slim-bullseye AS refextract

ARG APP_HOME=/refextract
WORKDIR ${APP_HOME}
Expand All @@ -10,8 +10,13 @@ RUN pip install --no-cache-dir poetry
RUN poetry config virtualenvs.create false \
&& poetry install --only main

COPY . ${APP_HOME}
COPY refextract refextract/


ENV PROMETHEUS_MULTIPROC_DIR='/tmp'
ENTRYPOINT exec gunicorn -b :5000 --access-logfile - --error-logfile - refextract.app:app --timeout 650

FROM refextract AS refextract-tests

COPY tests tests/
RUN poetry install

0 comments on commit 1600a3c

Please sign in to comment.