Skip to content

Conversation

aHardReset
Copy link
Owner

@aHardReset aHardReset commented Nov 24, 2022

adding core functionality to the api.

  • Endpoint to get the required results
  • Basic Testing with mocked data
  • Adding documentation to swagger

adding docker support

@aHardReset aHardReset self-assigned this Nov 24, 2022
COPY poetry.lock pyproject.toml /

RUN poetry config virtualenvs.create false \
&& poetry install $(test "$YOUR_ENV" == production && echo "--no-dev") --no-interaction --no-ansi
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add as env vars --no-interaction and --no-ansi: POETRY_NO_ANSI and POETRY_NO_INTERACTION

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checkout docker multi-stage builds for prod and dev environments.


COPY html_utils /html_utils

CMD ["poetry", "run", "uvicorn", "main:app", "--app-dir", "html_utils/", "--port", "80", "--host", "0.0.0.0"]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no need to call poetry run when virtualenvs = false

WORKDIR /
COPY poetry.lock pyproject.toml /

RUN poetry config virtualenvs.create false \
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

set config as env var: POETRY_VIRTUAENVS_CREATE = 0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants