-
-
Notifications
You must be signed in to change notification settings - Fork 704
Expand file tree
/
Copy pathDockerfile.celery.j2
More file actions
28 lines (23 loc) · 739 Bytes
/
Dockerfile.celery.j2
File metadata and controls
28 lines (23 loc) · 739 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
{% include 'Dockerfile.base.j2' %}
COPY pyproject.toml uv.lock /tmp/uv-deps/
{% if disable_cache_mounts %}
RUN \
{% else %}
RUN --mount=type=cache,target=/root/.cache/uv \
{% endif %}
uv venv --system-site-packages /opt/venv && \
cd /tmp/uv-deps && \
VIRTUAL_ENV=/opt/venv uv sync --active --only-group celery --no-install-project --frozen
ENV PATH="/opt/venv/bin:$PATH"
RUN mkdir -p /usr/src/app
COPY . /usr/src/app/
WORKDIR /usr/src/app
ENV GIT_HASH={{ git_hash }}
ENV GIT_SHORT_HASH={{ git_short_hash }}
ENV GIT_BRANCH={{ git_branch }}
ENV DJANGO_SETTINGS_MODULE="anthias_django.settings"
CMD celery -A celery_tasks.celery worker \
-B -n worker@anthias \
--loglevel=info \
--schedule \
/tmp/celerybeat-schedule