diff --git a/.github/workflows/docker-testimage.yml b/.github/workflows/docker-testimage.yml index 1ddb3fd..cc721e8 100644 --- a/.github/workflows/docker-testimage.yml +++ b/.github/workflows/docker-testimage.yml @@ -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 }} diff --git a/Dockerfile b/Dockerfile index 99e34d7..eb1affe 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 \ No newline at end of file