Skip to content

Commit 79a288f

Browse files
authored
Merge pull request IBM#5 from IBM/postgresql-dependency
Add postgresql to container build Signed-off-by: Vicky Kuo <[email protected]>
2 parents 569eec2 + 24f1030 commit 79a288f

File tree

4 files changed

+11
-2
lines changed

4 files changed

+11
-2
lines changed

Containerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ COPY . /app
2121
# Create virtual environment, upgrade pip and install dependencies using uv for speed
2222
RUN python3 -m venv /app/.venv && \
2323
/app/.venv/bin/python3 -m pip install --upgrade pip setuptools pdm uv && \
24-
/app/.venv/bin/python3 -m uv pip install .
24+
/app/.venv/bin/python3 -m uv pip install .[redis,postgres]
2525

2626
# update the user permissions
2727
RUN chown -R 1001:0 /app && \

Containerfile.lite

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ COPY . /app
6363
RUN set -euo pipefail \
6464
&& python3 -m venv /app/.venv \
6565
&& /app/.venv/bin/pip install --no-cache-dir --upgrade pip setuptools wheel pdm uv \
66-
&& /app/.venv/bin/uv pip install . \
66+
&& /app/.venv/bin/uv pip install .[redis,postgres] \
6767
&& rm -rf /root/.cache /var/cache/dnf
6868

6969
# ----------------------------------------------------------------------------

Makefile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ os-deps: $(OS_DEPS_SCRIPT)
7171
# help: activate - Activate the virtual environment in the current shell
7272
# help: install - Install project into the venv
7373
# help: install-dev - Install project (incl. dev deps) into the venv
74+
# help: install-db - Install project (incl. postgres and redis) into venv
7475
# help: update - Update all installed deps inside the venv
7576
.PHONY: venv
7677
venv:
@@ -91,6 +92,10 @@ activate:
9192
install: venv
9293
@/bin/bash -c "source $(VENV_DIR)/bin/activate && python3 -m uv pip install ."
9394

95+
.PHONY: install-db
96+
install-db: venv
97+
@/bin/bash -c "source $(VENV_DIR)/bin/activate && python3 -m uv pip install .[redis,postgres]"
98+
9499
.PHONY: install-dev
95100
install-dev: venv
96101
@/bin/bash -c "source $(VENV_DIR)/bin/activate && python3 -m uv pip install .[dev]"

pyproject.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,10 @@ redis = [
7070
"redis>=6.1.0",
7171
]
7272

73+
postgres = [
74+
"psycopg2-binary>=2.9.10",
75+
]
76+
7377
# Optional dependency groups (development)
7478
dev = [
7579
"argparse-manpage>=4.6",

0 commit comments

Comments
 (0)