Skip to content

Commit 4a6dc71

Browse files
committed
changes
1 parent 05c39de commit 4a6dc71

File tree

3 files changed

+45
-31
lines changed

3 files changed

+45
-31
lines changed

backend/Dockerfile

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,16 @@ ENV DJANGO_SETTINGS_MODULE=pycon.settings.prod \
1414
CELERY_RESULT_BACKEND=demo \
1515
HASHID_DEFAULT_SECRET_SALT=demo
1616

17+
# RUN apt-get update -y && apt-get install -y \
18+
# libpq-dev libtiff5-dev libjpeg62 libopenjp2-7-dev zlib1g-dev \
19+
# libfreetype6-dev liblcms2-dev libwebp-dev tcl8.6-dev tk8.6-dev python3-tk \
20+
# libharfbuzz-dev libfribidi-dev libxcb1-dev libldap2-dev libldap-2.5-0 \
21+
# ffmpeg libsm6 libxext6 libglib2.0-0 libpango-1.0-0 libpangoft2-1.0-0 libharfbuzz-subset0
1722
RUN apt-get update -y && apt-get install -y \
18-
libpq-dev libtiff5-dev libjpeg62 libopenjp2-7-dev zlib1g-dev \
19-
libfreetype6-dev liblcms2-dev libwebp-dev tcl8.6-dev tk8.6-dev python3-tk \
20-
libharfbuzz-dev libfribidi-dev libxcb1-dev libldap2-dev libldap-2.5-0 \
21-
ffmpeg libsm6 libxext6 libglib2.0-0 libpango-1.0-0 libpangoft2-1.0-0 libharfbuzz-subset0
23+
# weasyprint
24+
libpango-1.0-0 libpangoft2-1.0-0 libharfbuzz-subset0 \
25+
# postgres - psycopg & also psql cli
26+
postgresql-client libpq-dev
2227

2328
FROM base AS build-stage
2429

@@ -58,12 +63,11 @@ COPY --from=build-stage ${FUNCTION_DIR}/schema.graphql schema.graphql
5863

5964
COPY custom_admin/ .
6065

61-
RUN ADMIN_GRAPHQL_URL=schema.graphql pnpm codegen
62-
RUN pnpm build
66+
RUN ADMIN_GRAPHQL_URL=schema.graphql pnpm codegen && pnpm build
6367

6468
# Runtime stage
6569

66-
FROM base
70+
FROM base AS runtime-stage
6771

6872
ARG FUNCTION_DIR
6973

@@ -83,9 +87,7 @@ COPY --chown=app:app . ${FUNCTION_DIR}
8387

8488
USER app
8589

86-
RUN mkdir -p assets
87-
88-
RUN .venv/bin/python manage.py collectstatic --noinput
90+
RUN mkdir -p assets && .venv/bin/python manage.py collectstatic --noinput
8991

9092
ENTRYPOINT ["/home/app/.venv/bin/gunicorn"]
9193
CMD [ "pycon.wsgi" ]

backend/pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,13 +73,11 @@ dependencies = [
7373
"django-import-export<4.0.0,>=3.2.0",
7474
"dal-admin-filters==1.1.0",
7575
"django-markdownify==0.9.5",
76-
"psycopg2==2.9.9",
7776
"django-imagekit==5.0.0",
7877
"pillow==10.4.0",
7978
"redis[hiredis]==5.0.2",
8079
"google-api-python-client<3.0.0,>=2.94.0",
8180
"google-auth<3.0.0,>=2.22.0",
82-
"opencv-python<5.0.0.0,>=4.8.0.74",
8381
"argon2-cffi<24.0.0,>=23.1.0",
8482
"stripe==10.5.0",
8583
"djangorestframework==3.15.2",
@@ -104,6 +102,8 @@ dependencies = [
104102
"pypdf>=5.1.0",
105103
"ipython>=8.30.0",
106104
"weasyprint>=63.1",
105+
"opencv-python-headless>=4.10.0.84",
106+
"psycopg[c]>=3.2.3",
107107
]
108108
name = "backend"
109109
version = "0.1.0"

backend/uv.lock

Lines changed: 31 additions & 19 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)