-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
77 additions
and
0 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,13 @@ | ||
.git | ||
.github | ||
.venv | ||
*.pyc | ||
*.env | ||
.coverage | ||
.devcontainer | ||
.gitignore | ||
.pre-commit-config.yaml | ||
.pytest_cache | ||
.ruff_cache | ||
__pycache__ | ||
tests |
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,24 @@ | ||
FROM python:3.11.8-slim-bookworm | ||
|
||
ARG GIT_REVISION="0000000" | ||
ARG GIT_TAG="x.x.x" | ||
|
||
WORKDIR /app | ||
# hadolint ignore=DL3008 | ||
RUN apt-get update \ | ||
&& apt-get install --no-install-recommends -y \ | ||
curl \ | ||
make \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
# Install poetry: https://python-poetry.org/docs/#installing-with-the-official-installer | ||
SHELL ["/bin/bash", "-o", "pipefail", "-c"] | ||
RUN curl -sSL https://install.python-poetry.org | python3 - | ||
ENV PATH="/root/.local/bin:$PATH" | ||
|
||
# Install dependencies | ||
COPY pyproject.toml poetry.lock Makefile /app/ | ||
RUN poetry config virtualenvs.create false && make install-deps | ||
COPY . . | ||
|
||
CMD ["python", "main.py"] |
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 |
---|---|---|
@@ -1,2 +1,6 @@ | ||
def add_numbers(a, b): | ||
return a + b | ||
|
||
|
||
if __name__ == "__main__": | ||
print(f"{add_numbers(3, 4)}") |