Openverse is a search engine for openly-licensed media. This monorepo includes all application code.
pgcli version is extracted into a docker argument (#3628)
Kenneth Ng4cc565323640
diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.ymlindex 81fac43a1..b6471e1d4 100644--- a/.github/workflows/ci_cd.yml+++ b/.github/workflows/ci_cd.yml@@ -229,6 +229,7 @@ jobs:INGESTION_PY_VERSION=${{ steps.prepare-build-args.outputs.ingestion_py_version }}FRONTEND_NODE_VERSION=${{ steps.prepare-build-args.outputs.frontend_node_version }}FRONTEND_PNPM_VERSION=${{ steps.prepare-build-args.outputs.frontend_pnpm_version }}+ PGCLI_VERSION=${{ steps.prepare-build-args.outputs.pgcli_version }}- name: Upload image `${{ matrix.image }}`id: upload-imgdiff --git a/api/justfile b/api/justfileindex 60357abc6..9bcc93400 100644--- a/api/justfile+++ b/api/justfile@@ -15,11 +15,15 @@ NO_COLOR := "\\033[0m"###########export API_PY_VERSION := `grep 'python_version' Pipfile | awk -F' = ' '{print $2}' | sed 's/"//g'`+export PGCLI_VERSION := `grep 'pgcli' Pipfile | awk -F' = ' '{print $2}' | sed 's/\~//g; s/"//g; s/=//g'`# Print the Python version specified in the `Pipfile`@py-version:echo $API_PY_VERSION+@pgcli-version:+ echo $PGCLI_VERSION+############ Install ############diff --git a/docker-compose.yml b/docker-compose.ymlindex 9e9e5fae1..4c40c6df7 100644--- a/docker-compose.yml+++ b/docker-compose.yml@@ -50,6 +50,8 @@ services:build:context: ./docker/upstream_db/target: db+ args: # Automatically inferred from env vars, unless specified+ - PGCLI_VERSIONimage: openverse-upstream_dbports:- "50255:5432"diff --git a/docker/upstream_db/Dockerfile b/docker/upstream_db/Dockerfileindex 7530733b6..5097bd660 100644--- a/docker/upstream_db/Dockerfile+++ b/docker/upstream_db/Dockerfile@@ -2,7 +2,7 @@FROM postgres:13.10 as db-ARG PGCLI_VERSION=4.0.1+ARG PGCLI_VERSION# Container optimizationsENV PYTHONUNBUFFERED=1diff --git a/justfile b/justfileindex e15881521..9f9cfe63f 100644--- a/justfile+++ b/justfile@@ -126,6 +126,7 @@ export API_PY_VERSION := `just api/py-version`export INGESTION_PY_VERSION := `just ingestion_server/py-version`export FRONTEND_NODE_VERSION := `just frontend/node-version`export FRONTEND_PNPM_VERSION := `just frontend/pnpm-version`+export PGCLI_VERSION := `just api/pgcli-version`export HOST_NETWORK_ADDRESS := if os() == "macos" { "host.docker.internal" } else { "172.17.0.1" }@@ -138,6 +139,7 @@ versions:ingestion_py_version=$(just ingestion_server/py-version)frontend_node_version=$(just frontend/node-version)frontend_pnpm_version=$(just frontend/pnpm-version)+ pgcli_version=$(just api/pgcli-version)EOF# Run `docker-compose` configured with the correct files and environment