From b8ff5119ca111b23af3e15a229b5d33a61dcf983 Mon Sep 17 00:00:00 2001 From: Nischal Shrestha Date: Wed, 17 Jul 2024 15:37:24 +0545 Subject: [PATCH] feat: add gdal & fix: cluster name from secrets --- .github/workflows/migrations.yml | 2 +- .gitignore | 3 +++ src/backend/Dockerfile | 5 +++++ src/backend/pdm.lock | 14 ++++++++++++-- src/backend/pyproject.toml | 1 + 5 files changed, 22 insertions(+), 3 deletions(-) diff --git a/.github/workflows/migrations.yml b/.github/workflows/migrations.yml index 5e772d3d..14317a2e 100644 --- a/.github/workflows/migrations.yml +++ b/.github/workflows/migrations.yml @@ -37,4 +37,4 @@ jobs: shell: bash run: | TASK_ID=`aws ecs list-tasks --cluster ${{ secrets.ECS_CLUSTER_NAME }} --service ${{ secrets.ECS_SERVICE_NAME }} | jq -r .taskArns[0]` - aws ecs execute-command --cluster dtm-ecs-cluster --task $TASK_ID --region ${{env.AWS_REGION}} --interactive --command "/bin/bash -c 'pdm run alembic upgrade head'" + aws ecs execute-command --cluster ${{ secrets.ECS_CLUSTER_NAME }} --task $TASK_ID --region ${{env.AWS_REGION}} --interactive --command "/bin/bash -c 'pdm run alembic upgrade head'" diff --git a/.gitignore b/.gitignore index f8dae558..113be5ab 100644 --- a/.gitignore +++ b/.gitignore @@ -82,3 +82,6 @@ DockerData/ #Backend Template src/backend/templates/* + +# precommit +.ruff_cache/ \ No newline at end of file diff --git a/src/backend/Dockerfile b/src/backend/Dockerfile index 1db3b8ad..e66ed6b5 100644 --- a/src/backend/Dockerfile +++ b/src/backend/Dockerfile @@ -11,12 +11,15 @@ RUN set -ex \ -y --no-install-recommends \ "build-essential" \ "gcc" \ + "g++" \ "libpcre3-dev" \ "libpq-dev" \ "libspatialindex-dev" \ "libproj-dev" \ "libgeos-dev" \ "git" \ + "gdal-bin" \ + "libgdal-dev" \ && rm -rf /var/lib/apt/lists/* # Install PDM @@ -52,6 +55,8 @@ RUN set -ex \ "libspatialindex-c6" \ "libproj25" \ "libgeos-c1v5" \ + "gdal-bin" \ + "libgdal-dev" \ && rm -rf /var/lib/apt/lists/* # Retrieve packages from build stage diff --git a/src/backend/pdm.lock b/src/backend/pdm.lock index 290327d3..8023631d 100644 --- a/src/backend/pdm.lock +++ b/src/backend/pdm.lock @@ -4,8 +4,8 @@ [metadata] groups = ["default"] strategy = ["cross_platform", "inherit_metadata"] -lock_version = "4.4.1" -content_hash = "sha256:290d9c3f29acfe809ff147f097a4a0ddd95fd5ca93cdd7f1509537775cd02541" +lock_version = "4.4.2" +content_hash = "sha256:1c8fe05d30976d92fb421238dddbe87fffb2adf94b4c54df2e1500c4fd84873a" [[package]] name = "alembic" @@ -525,6 +525,16 @@ files = [ {file = "fmtm_splitter-1.2.2-py3-none-any.whl", hash = "sha256:bbef78cf0e1f2b67f8c8aeaadb7fd2927bfd333d216927059a12abbbb04a5742"}, ] +[[package]] +name = "gdal" +version = "3.6.2" +requires_python = ">=3.6.0" +summary = "GDAL: Geospatial Data Abstraction Library" +groups = ["default"] +files = [ + {file = "GDAL-3.6.2.tar.gz", hash = "sha256:a167cde1813707d91a938dad1a22f280f5ad28c45980d42e948fb8c59f890f5a"}, +] + [[package]] name = "geoalchemy2" version = "0.14.2" diff --git a/src/backend/pyproject.toml b/src/backend/pyproject.toml index 19d72990..8ebd9df1 100644 --- a/src/backend/pyproject.toml +++ b/src/backend/pyproject.toml @@ -38,6 +38,7 @@ dependencies = [ "asyncpg>=0.29.0", "Jinja2>=3.1.4", "numpy==1.26.4", + "GDAL==3.6.2", ] requires-python = ">=3.10" license = {text = "GPL-3.0-only"}