Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Html info core #1

Open
wants to merge 16 commits into
base: main
Choose a base branch
from
Open

Html info core #1

wants to merge 16 commits into from

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

.gitignore Outdated Show resolved Hide resolved
Dockerfile Outdated Show resolved Hide resolved
html_utils/scraping.py Outdated Show resolved Hide resolved
html_utils/scraping.py Outdated Show resolved Hide resolved
html_utils/utils.py Outdated Show resolved Hide resolved
html_utils/utils.py Outdated Show resolved Hide resolved
html_utils/utils.py Outdated Show resolved Hide resolved
requirements.txt Show resolved Hide resolved
tests/html_snapshots/pydantic.html Outdated Show resolved Hide resolved
html_utils/utils.py Outdated Show resolved Hide resolved
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.

None yet

2 participants