Skip to content

Commit

Permalink
poetry
Browse files Browse the repository at this point in the history
lAmeR1 committed May 1, 2024
1 parent ae4dd27 commit 9342071
Showing 2 changed files with 9 additions and 6 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/docker-testimage.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Docker Image TESTBUILD

name: Docker Image :wq
:w:~/
on: push

jobs:
@@ -12,6 +12,8 @@ jobs:
runs-on: ${{ matrix.os }}

steps:
- name: Add SHORT_SHA env property with commit short sha
run: echo "SHORT_SHA=`echo ${GITHUB_SHA} | cut -c1-8`" >> $GITHUB_ENV
- name: Checkout code
uses: actions/checkout@v2

@@ -33,7 +35,7 @@ jobs:
run: |
docker buildx build \
--platform linux/amd64,linux/arm64 \
-t supertypo/kaspa-rest-server:branchtest \
-t supertypo/kaspa-rest-server:${{ SHORT_SHA }} \
--push .
docker buildx imagetools inspect supertypo/kaspa-rest-server:branchtest
docker buildx imagetools inspect supertypo/kaspa-rest-server:${{ SHORT_SHA }}
5 changes: 3 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -12,12 +12,13 @@ RUN apt update
RUN apt install uvicorn gunicorn -y

WORKDIR /app
COPY poetry.lock pyproject.toml ./
COPY . .

RUN python -m pip install --upgrade pip
RUN pip install poetry
RUN poetry install --no-root --no-interaction

COPY . .
# make pipenv commands still running
RUN ln /usr/local/bin/poetry /usr/local/bin/pipenv

CMD poetry run gunicorn -b 0.0.0.0:8000 -w 4 -k uvicorn.workers.UvicornWorker main:app --timeout 120

0 comments on commit 9342071

Please sign in to comment.