Skip to content

Commit 01522d1

Browse files
authored
PYTHON-4351, PYTHON-4363 Fix celeryworker startup and pin pydantic (#38)
1 parent 410084a commit 01522d1

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

{{cookiecutter.project_slug}}/backend/app/pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ dependencies = [
3030
"raven>=6.10.0",
3131
"jinja2>=3.1.2",
3232
"python-jose[cryptography]>=3.3.0",
33-
"pydantic>=2.0",
33+
"pydantic>=2.0,<2.7",
3434
"pydantic-settings>=2.0.3",
3535
"httpx>=0.23.1",
3636
"psycopg2-binary>=2.9.5",

{{cookiecutter.project_slug}}/backend/celeryworker.dockerfile

+4-6
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,10 @@ ENV \
1313
PIPX_VERSION=$PIPX_VERSION \
1414
PYTHONPATH=/app
1515
COPY ./app/ /app/
16-
RUN <<HEREDOC
17-
python -m pip install --no-cache-dir --upgrade pip "pipx==$PIPX_VERSION"
18-
pipx install "hatch==$HATCH_VERSION"
19-
hatch env prune && hatch env create production
20-
chmod +x /app/worker-start.sh
21-
HEREDOC
16+
RUN python -m pip install --no-cache-dir --upgrade pip "pipx==$PIPX_VERSION"
17+
RUN pipx install "hatch==$HATCH_VERSION"
18+
RUN hatch env prune && hatch env create production
19+
RUN chmod +x /app/worker-start.sh
2220

2321
# For development, Jupyter remote kernel, Hydrogen
2422
# Using inside the container:

0 commit comments

Comments
 (0)