-
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.
[env] Get dev containers working with the dev database
- Loading branch information
1 parent
673920c
commit 4dcb668
Showing
5 changed files
with
56 additions
and
18 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
FROM python:3.11-bookworm | ||
|
||
RUN apt update | ||
RUN apt install cron -y | ||
|
||
ARG POETRY_VERSION=1.5.1 | ||
ARG CRON="* * * * *" | ||
|
||
ENV POETRY_NO_INTERACTION=1 \ | ||
POETRY_VIRTUALENVS_IN_PROJECT=1 \ | ||
POETRY_VIRTUALENVS_CREATE=1 \ | ||
POETRY_CACHE_DIR=/tmp/poetry_cache \ | ||
VIRTUAL_ENV=/app/.venv \ | ||
PATH=/app/.venv/vin:$PATH \ | ||
PYTHONPATH=/app/src:$PYTHONPATH | ||
|
||
RUN pip install poetry==${POETRY_VERSION} | ||
|
||
WORKDIR /app | ||
COPY pyproject.toml poetry.lock ./ | ||
RUN touch README.md | ||
RUN poetry install --no-root | ||
|
||
COPY src ./src | ||
RUN poetry install | ||
|
||
RUN mkdir /run/secrets | ||
RUN echo password > /run/secrets/api_password | ||
RUN echo password > /run/secrets/db_password | ||
RUN echo "${CRON} cd /app && /usr/local/bin/poetry run python /app/src/updater/main.py > /tmp/stdout 2> /tmp/stderr" > crontab | ||
RUN crontab crontab | ||
|
||
COPY entrypoint.sh ./entrypoint.sh | ||
RUN chmod +x ./entrypoint.sh | ||
|
||
CMD [ "./entrypoint.sh" ] | ||
|
File renamed without changes.