diff --git a/.github/workflows/build_and_deploy.yml b/.github/workflows/build_and_deploy.yml index ac5b321..b4dcc47 100644 --- a/.github/workflows/build_and_deploy.yml +++ b/.github/workflows/build_and_deploy.yml @@ -26,20 +26,21 @@ jobs: registry: ${{ env.REGISTRY }} username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - - name: Extract Titiler version - - uses: actions/setup-python@v4 - with: - python-version: '3.10' - run: python -m pip install titiler && echo "TITILER_VERSION=$(python -c 'from titiler.application import __version__;print(__version__)')" >> $GITHUB_ENV - #echo "GITHUB_SHA_SHORT=$(python -c 'from src/cogserver')" >> $GITHUB_ENV - #run: python my_script.py - - name: Echo Titiler version - run: echo "za tit versions is {{ env.TITILER_VERSION }}" + +# - name: Extract Titiler version +# - uses: actions/setup-python@v4 +# with: +# python-version: '3.10' +# run: python -m pip install titiler && echo "TITILER_VERSION=$(python -c 'from titiler.application import __version__;print(__version__)')" >> $GITHUB_ENV +# #echo "GITHUB_SHA_SHORT=$(python -c 'from src/cogserver')" >> $GITHUB_ENV +# #run: python my_script.py +# - name: Echo Titiler version +# run: echo "za tit versions is {{ env.TITILER_VERSION }}" - name: Extract metadata (tags, labels) for Docker id: meta uses: docker/metadata-action@v5 with: - images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.TITILER_VERSION }} + images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} - name: Build and push Docker image uses: docker/build-push-action@v5 @@ -47,5 +48,5 @@ jobs: context: . file: Dockerfile push: ${{ github.ref == 'refs/heads/main'}} - tags: ${{ steps.meta.outputs.tags }} + tags: ghcr.io/${{ env.IMAGE_NAME }}:${{ steps.tag.outputs.tag }} labels: ${{ steps.meta.outputs.labels }} diff --git a/Dockerfile b/Dockerfile index 3334e7e..c49f73e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,7 +7,9 @@ RUN python3 -m pip install pipenv WORKDIR /opt/server RUN export PYTHON_VERSION="$(python3 --version | cut -d ' ' -f 2)" && pipenv --python ${PYTHON_VERSION} RUN pipenv run pip install -U pip -RUN pipenv run pip install uvicorn titiler asyncpg postgis --no-cache-dir --upgrade +#RUN pipenv run pip install uvicorn titiler asyncpg postgis --no-cache-dir --upgrade +COPY requirements.txt requirements.txt +RUN pipenv run pip install -r requirements.txt COPY src/cogserver cogserver ENV HOST=0.0.0.0 ENV PORT=80 diff --git a/renovate.json b/renovate.json index 39a2b6e..fc99216 100644 --- a/renovate.json +++ b/renovate.json @@ -2,5 +2,10 @@ "$schema": "https://docs.renovatebot.com/renovate-schema.json", "extends": [ "config:base" - ] + ], + "pip_requirements": { + "fileMatch": [ + "requirements.txt" + ] + } } diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..81c12f9 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,5 @@ +titiler==0.15.5 +asyncpg==0.29.0 +postgis==1.0.4 +uvicorn==0.23.2 + diff --git a/src/cogserver/__init__.py b/src/cogserver/__init__.py index e762f1c..353c36a 100644 --- a/src/cogserver/__init__.py +++ b/src/cogserver/__init__.py @@ -1,2 +1 @@ -from cogserver.server import app -from cogserver.server import titiler_version as __version__ \ No newline at end of file +from cogserver.server import app \ No newline at end of file