-
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
1 parent
66f6767
commit d4a4a2f
Showing
13 changed files
with
406 additions
and
240 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,7 @@ | ||
[tools] | ||
python = "3.11" | ||
poetry = "latest" | ||
|
||
[env] | ||
_.file = '../../.env' | ||
_.python.venv = { path = "../../.venv", create = false } |
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,3 @@ | ||
.venv | ||
.pytest_cache | ||
.ruff_cache |
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,15 @@ | ||
fail_fast: true | ||
repos: | ||
- repo: local | ||
hooks: | ||
- id: ruff-check | ||
name: Ruff check | ||
entry: poetry run ruff check | ||
args: [--fix] | ||
language: system | ||
types: [file, python] | ||
- id: ruff-format | ||
name: Ruff format | ||
entry: poetry run ruff format | ||
language: system | ||
types: [file, python] |
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,26 +1,14 @@ | ||
FROM python:3.11-bookworm | ||
FROM 007065811408.dkr.ecr.eu-west-3.amazonaws.com/python-3-11:1 | ||
|
||
RUN \ | ||
apt-get -y update \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
WORKDIR /app | ||
|
||
RUN pip3 install --upgrade pip \ | ||
&& pip3 install -U setuptools | ||
COPY pyproject.toml poetry.lock poetry.toml ./ | ||
|
||
RUN pip install poetry | ||
# Poetry complains if no README.md exists | ||
RUN touch README.md | ||
|
||
COPY poetry.lock /home/src/nurse/poetry.lock | ||
COPY pyproject.toml /home/src/nurse/pyproject.toml | ||
RUN POETRY_NO_INTERACTION=1 poetry install | ||
|
||
WORKDIR /home/src/nurse | ||
COPY . . | ||
|
||
ARG REQUIREMENTS=common | ||
ENV REQUIREMENTS $REQUIREMENTS | ||
RUN mkdir requirements | ||
RUN poetry export -f requirements.txt --without-hashes > requirements/$REQUIREMENTS.txt | ||
RUN poetry export -f requirements.txt --without-hashes --with dev > requirements/dev.txt | ||
|
||
RUN pip3 install -r requirements/$REQUIREMENTS.txt | ||
|
||
COPY . /home/src/nurse | ||
CMD ["bash"] | ||
CMD ["bash"] |
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,13 +1,10 @@ | ||
version: '3.0' | ||
|
||
services: | ||
|
||
nurse: | ||
build: | ||
context: . | ||
args: | ||
- REQUIREMENTS=dev | ||
tty: true | ||
working_dir: /home/src/nurse | ||
working_dir: /app | ||
volumes: | ||
- ./.:/home/src/nurse | ||
- ./.:/app | ||
- /app/.venv |
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
Oops, something went wrong.