Add healthcheck to Dockerfile

See #184
main
Ben Busby 2021-03-08 12:38:40 -05:00 committed by Ben Busby
parent f8dfc78539
commit e5d1f6a292
2 changed files with 5 additions and 2 deletions

View File

@ -62,4 +62,7 @@ COPY run .
EXPOSE $EXPOSE_PORT EXPOSE $EXPOSE_PORT
HEALTHCHECK --interval=5m --timeout=5s \
CMD wget --no-verbose --tries=1 http://localhost:${EXPOSE_PORT}/ || exit 1
CMD config/tor/start-tor.sh & ./run CMD config/tor/start-tor.sh & ./run

View File

@ -38,8 +38,8 @@ def has_ad_content(element: str) -> bool:
bool: True/False for the element containing an ad bool: True/False for the element containing an ad
""" """
return element.upper() in (value.upper() for value in BLACKLIST) \ return (element.upper() in (value.upper() for value in BLACKLIST)
or '' in element or '' in element)
def get_first_link(soup: BeautifulSoup) -> str: def get_first_link(soup: BeautifulSoup) -> str: