From a0be6a3ccc26863e029767cc02f7e87002967cdd Mon Sep 17 00:00:00 2001 From: David Lougheed Date: Wed, 22 Mar 2023 10:52:45 -0400 Subject: [PATCH 1/6] chore: don't use venv in dev image --- dev.Dockerfile | 6 +++--- run.dev.bash | 6 ++---- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/dev.Dockerfile b/dev.Dockerfile index ea21b28..2d1428a 100644 --- a/dev.Dockerfile +++ b/dev.Dockerfile @@ -1,9 +1,9 @@ -FROM ghcr.io/bento-platform/bento_base_image:python-debian-2023.02.27 +FROM ghcr.io/bento-platform/bento_base_image:python-debian-2023.03.21 # Run as root in the Dockerfile until we drop down to the service user in the entrypoint USER root -RUN source /env/bin/activate && pip install --no-cache-dir "uvicorn[standard]==0.20.0" +RUN pip install --no-cache-dir "uvicorn[standard]==0.20.0" WORKDIR /aggregation @@ -14,7 +14,7 @@ COPY poetry.lock . # Install production + development dependencies # Without --no-root, we get errors related to the code not being copied in yet. # But we don't want the code here, otherwise Docker cache doesn't work well. -RUN source /env/bin/activate && poetry install --no-root +RUN poetry install --no-root # Don't copy code in, since it gets mounted in with development mode. # Copy in an entrypoint + runner script so we have somewhere to start. diff --git a/run.dev.bash b/run.dev.bash index 1681093..1cc0c59 100644 --- a/run.dev.bash +++ b/run.dev.bash @@ -5,10 +5,8 @@ cd /aggregation || exit # Set .gitconfig for development /set_gitconfig.bash -source /env/bin/activate - -# Update dependencies and install module locally (similar to pip install -e: "editable mode") -poetry install +# Update dependencies and install module locally +/poetry_user_install_dev.bash export BENTO_DEBUG=true export CHORD_DEBUG=true From 77ccd28f60fbe3ba9803b31242ca865db8ebaba1 Mon Sep 17 00:00:00 2001 From: David Lougheed Date: Wed, 22 Mar 2023 10:53:35 -0400 Subject: [PATCH 2/6] chore: add dev container metadata --- dev.Dockerfile | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/dev.Dockerfile b/dev.Dockerfile index 2d1428a..ab03bd9 100644 --- a/dev.Dockerfile +++ b/dev.Dockerfile @@ -1,5 +1,16 @@ FROM ghcr.io/bento-platform/bento_base_image:python-debian-2023.03.21 +LABEL org.opencontainers.image.description="Local development image the Bento aggregation service." +LABEL devcontainer.metadata='[{ \ + "remoteUser": "bento_user", \ + "customizations": { \ + "vscode": { \ + "extensions": ["ms-python.python", "eamodio.gitlens"], \ + "settings": {"workspaceFolder": "/aggregation"} \ + } \ + } \ +}]' + # Run as root in the Dockerfile until we drop down to the service user in the entrypoint USER root From ae3c29445488a3c6f1c49f002626274d6fcd86a4 Mon Sep 17 00:00:00 2001 From: David Lougheed Date: Wed, 22 Mar 2023 10:53:45 -0400 Subject: [PATCH 3/6] chore: update prod base image --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index da7a6bd..aa49db8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM ghcr.io/bento-platform/bento_base_image:python-debian-2023.02.27 +FROM ghcr.io/bento-platform/bento_base_image:python-debian-2023.03.21 # Run as root in the Dockerfile until we drop down to the service user in the entrypoint USER root From f7bbe8bcb9527200ea7985383b5d5685aaab7d3b Mon Sep 17 00:00:00 2001 From: David Lougheed Date: Wed, 22 Mar 2023 13:03:01 -0400 Subject: [PATCH 4/6] chore: let base image take care of git config --- dev.Dockerfile | 2 +- run.dev.bash | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/dev.Dockerfile b/dev.Dockerfile index ab03bd9..d3899f6 100644 --- a/dev.Dockerfile +++ b/dev.Dockerfile @@ -1,4 +1,4 @@ -FROM ghcr.io/bento-platform/bento_base_image:python-debian-2023.03.21 +FROM ghcr.io/bento-platform/bento_base_image:python-debian-2023.03.22 LABEL org.opencontainers.image.description="Local development image the Bento aggregation service." LABEL devcontainer.metadata='[{ \ diff --git a/run.dev.bash b/run.dev.bash index 1cc0c59..6cb65bb 100644 --- a/run.dev.bash +++ b/run.dev.bash @@ -2,8 +2,7 @@ cd /aggregation || exit -# Set .gitconfig for development -/set_gitconfig.bash +# The default base image entrypoint takes care of creating bento_user and configuring git # Update dependencies and install module locally /poetry_user_install_dev.bash From c5e7d14b1d2369e106d2316bad87dcc414464f38 Mon Sep 17 00:00:00 2001 From: David Lougheed Date: Wed, 22 Mar 2023 13:03:16 -0400 Subject: [PATCH 5/6] chore: update prod base image ver --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index aa49db8..8026ee5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM ghcr.io/bento-platform/bento_base_image:python-debian-2023.03.21 +FROM ghcr.io/bento-platform/bento_base_image:python-debian-2023.03.22 # Run as root in the Dockerfile until we drop down to the service user in the entrypoint USER root From 17819821e15cc3fb388c3134399b8e167a5e05f4 Mon Sep 17 00:00:00 2001 From: David Lougheed Date: Wed, 22 Mar 2023 14:59:30 -0400 Subject: [PATCH 6/6] chore: bump version to 0.18.1 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 87578b8..0c1d7c9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api" [tool.poetry] name = "bento_aggregation_service" -version = "0.18.0" +version = "0.18.1" description = "Search result aggregation service for the Bento platform." authors = ["David Lougheed "] readme = "README.md"