-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Separate scheduler into Docker container
- Loading branch information
Showing
4 changed files
with
48 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
FROM python:3.12-slim as python-base | ||
|
||
ENV POETRY_VERSION=1.7.1 \ | ||
POETRY_HOME=/opt/poetry \ | ||
POETRY_VENV=/opt/poetry-venv \ | ||
POETRY_CACHE_DIR=/opt/.cache | ||
|
||
FROM python-base as poetry-base | ||
|
||
RUN python3 -m venv $POETRY_VENV \ | ||
&& $POETRY_VENV/bin/pip install -U pip setuptools \ | ||
&& $POETRY_VENV/bin/pip install poetry==${POETRY_VERSION} | ||
|
||
FROM python-base as app | ||
|
||
RUN apt update && apt install -y build-essential | ||
|
||
COPY --from=poetry-base ${POETRY_VENV} ${POETRY_VENV} | ||
ENV PATH="${PATH}:${POETRY_VENV}/bin" | ||
|
||
WORKDIR /app | ||
COPY ../poetry.lock pyproject.toml ./ | ||
|
||
RUN poetry check && \ | ||
poetry install --no-interaction --no-cache --no-root | ||
|
||
COPY .. . | ||
|
||
CMD poetry run arq fanfan.infrastructure.scheduler.WorkerSettings |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters