wacz working withing docker

This commit is contained in:
msramalho
2023-07-28 16:01:45 +01:00
parent c1d76fae81
commit 4741638c33
3 changed files with 11 additions and 153 deletions

View File

@@ -1,24 +1,21 @@
# pull official base image 3.9
# FROM python:3.9.5-slim-buster
From python:3.10
# From python:3.10
FROM bellingcat/auto-archiver
# set work directory
WORKDIR /usr/src/app
WORKDIR /app
# set environment variables
ENV PYTHONUNBUFFERED 1
ENV PYTHONDONTWRITEBYTECODE 1
ENV RUNNING_IN_DOCKER 1
# install dependencies
RUN pip install --upgrade pip && \
apt-get update && \
apt-get install -y gcc ffmpeg fonts-noto firefox-esr exiftool && \
wget https://github.com/mozilla/geckodriver/releases/download/v0.32.0/geckodriver-v0.32.0-linux64.tar.gz && \
tar -xvzf geckodriver* -C /usr/local/bin && \
chmod +x /usr/local/bin/geckodriver && \
rm geckodriver-v*
COPY ./requirements.txt .
RUN pip install -r requirements.txt
apt-get update
COPY Pipfile* ./
RUN pipenv install
# copy src code over
COPY . .
ENTRYPOINT ["pipenv", "run"]

View File

@@ -24,7 +24,7 @@ load_dotenv()
# Configuration
ALLOWED_ORIGINS = os.environ.get("ALLOWED_ORIGINS", "chrome-extension://ondkcheoicfckabcnkdgbepofpjmjcmb,chrome-extension://ojcimmjndnlmmlgnjaeojoebaceokpdp").split(",")
VERSION = "0.5.1"
VERSION = "0.5.2"
# min-version refers to the version of auto-archiver-extension on the webstore
BREAKING_CHANGES = {"minVersion": "0.3.1", "message": "The latest update has breaking changes, please update the extension to the most recent version."}
@@ -85,7 +85,7 @@ def search(skip: int = 0, limit: int = 100, db: Session = Depends(get_db), email
return crud.search_tasks_by_email(db, email, skip=skip, limit=limit)
@app.post("/tasks", status_code=201)
def archive_sheet(archive:schemas.ArchiveCreate, email = Depends(get_bearer_auth)):
def archive_tasks(archive:schemas.ArchiveCreate, email = Depends(get_bearer_auth)):
archive.author_id = email
url = archive.url
logger.info(f"new {archive.public=} task for {email=} and {archive.group_id=}: {url}")

View File

@@ -1,139 +0,0 @@
# -i https://pypi.org/simple
aiofiles==0.6.0
aiohttp==3.8.5 ; python_version >= '3.6'
aiosignal==1.3.1 ; python_version >= '3.7'
aiosqlite==0.19.0
alembic==1.11.1
amqp==2.6.1 ; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'
anyio==3.7.1 ; python_version >= '3.7'
argparse==1.4.0
async-generator==1.10 ; python_version >= '3.5'
async-timeout==4.0.2 ; python_version >= '3.6'
attrs==23.1.0 ; python_version >= '3.7'
authlib==0.15.6
auto-archiver==0.6.2
beautifulsoup4==4.12.2 ; python_full_version >= '3.6.0'
billiard==3.6.4.0
blinker==1.6.2 ; python_version >= '3.7'
boto3==1.28.14 ; python_version >= '3.7'
botocore==1.31.14 ; python_version >= '3.7'
brotli==1.0.9 ; platform_python_implementation >= 'CPython'
bs4==0.0.1
cachetools==5.3.1 ; python_version >= '3.7'
celery==4.4.7
certifi==2023.7.22 ; python_version >= '3.6'
cffi==1.15.1
charset-normalizer==3.2.0 ; python_full_version >= '3.7.0'
click==8.1.6 ; python_version >= '3.7'
cloudscraper==1.2.71
cryptography==41.0.2 ; python_version >= '3.7'
dataclasses-json==0.5.13 ; python_version < '3.12' and python_version >= '3.7'
dateparser==1.1.8 ; python_version >= '3.7'
exceptiongroup==1.1.2 ; python_version < '3.11'
fastapi==0.95.2
fastapi-utils==0.2.1
ffmpeg-python==0.2.0
filelock==3.12.2 ; python_version >= '3.7'
flask==2.3.2 ; python_version >= '3.8'
flower==0.9.7
frozenlist==1.4.0 ; python_version >= '3.8'
future==0.18.3 ; python_version >= '2.6' and python_version not in '3.0, 3.1, 3.2, 3.3'
google-api-core==2.11.1 ; python_version >= '3.7'
google-api-python-client==2.95.0 ; python_version >= '3.7'
google-auth==2.22.0 ; python_version >= '3.6'
google-auth-httplib2==0.1.0
google-auth-oauthlib==1.0.0 ; python_version >= '3.6'
googleapis-common-protos==1.59.1 ; python_version >= '3.7'
greenlet==2.0.2 ; python_version >= '3' and platform_machine == 'aarch64' or (platform_machine == 'ppc64le' or (platform_machine == 'x86_64' or (platform_machine == 'amd64' or (platform_machine == 'AMD64' or (platform_machine == 'win32' or platform_machine == 'WIN32')))))
gspread==5.10.0 ; python_version >= '3.7'
h11==0.14.0 ; python_version >= '3.7'
httpcore==0.17.3 ; python_version >= '3.7'
httplib2==0.22.0 ; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'
httpx==0.24.1 ; python_version >= '3.7'
humanize==4.6.0 ; python_version >= '3.7'
idna==3.4 ; python_version >= '3.5'
iniconfig==2.0.0 ; python_version >= '3.7'
instaloader==4.10 ; python_version >= '3.8'
itsdangerous==2.1.2 ; python_version >= '3.7'
jinja2==3.1.2
jmespath==1.0.1 ; python_version >= '3.7'
kombu==4.6.11 ; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'
loguru==0.7.0
lxml==4.9.3 ; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'
mako==1.2.4 ; python_version >= '3.7'
markdown-it-py==3.0.0 ; python_version >= '3.8'
markupsafe==2.1.3 ; python_version >= '3.7'
marshmallow==3.20.1 ; python_version >= '3.8'
marshmallow-enum==1.5.1
mdurl==0.1.2 ; python_version >= '3.7'
multidict==6.0.4 ; python_version >= '3.7'
mutagen==1.46.0 ; python_version >= '3.7'
mypy-extensions==1.0.0 ; python_version >= '3.5'
numpy==1.25.1 ; python_version >= '3.9'
oauth2client==4.1.3
oauthlib==3.2.2 ; python_version >= '3.6'
outcome==1.2.0 ; python_version >= '3.7'
packaging==23.1 ; python_version >= '3.7'
pdqhash==0.2.3
pillow==10.0.0 ; python_version >= '3.8'
pluggy==0.13.1 ; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'
prometheus-client==0.8.0
prometheus-fastapi-instrumentator==6.0.0
protobuf==4.23.4 ; python_version >= '3.7'
py==1.11.0 ; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'
pyaes==1.6.1
pyasn1==0.5.0 ; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4, 3.5'
pyasn1-modules==0.3.0 ; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4, 3.5'
pycparser==2.21
pycryptodomex==3.18.0 ; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'
pydantic==1.10.8 ; python_version >= '3.7'
pygments==2.15.1 ; python_version >= '3.7'
pyparsing==3.1.0 ; python_version >= '3.1'
pysocks==1.7.1
pytest==6.2.4
python-dateutil==2.8.2 ; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'
python-dotenv==1.0.0
python-slugify==8.0.1 ; python_version >= '3.7'
python-twitter-v2==0.8.1 ; python_version >= '3.6' and python_version < '4.0'
pytz==2023.3
pyyaml==6.0.1 ; python_version >= '3.6'
redis==3.5.3
regex==2023.6.3 ; python_version >= '3.6'
requests==2.31.0
requests-oauthlib==1.3.1 ; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'
requests-toolbelt==1.0.0 ; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'
rich==13.4.2 ; python_full_version >= '3.7.0'
rsa==4.9 ; python_version >= '3.6' and python_version < '4'
s3transfer==0.6.1 ; python_version >= '3.7'
selenium==4.10.0 ; python_version >= '3.7'
six==1.16.0 ; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'
sniffio==1.3.0 ; python_version >= '3.7'
snscrape==0.7.0.20230622 ; python_version ~= '3.8'
sortedcontainers==2.4.0
soupsieve==2.4.1 ; python_version >= '3.7'
sqlalchemy==1.4.48
starlette==0.27.0 ; python_version >= '3.7'
telethon==1.29.2 ; python_version >= '3.5'
text-unidecode==1.3
tiktok-downloader==0.3.5
toml==0.10.2 ; python_version >= '2.6' and python_version not in '3.0, 3.1, 3.2, 3.3'
tornado==6.3.2 ; python_full_version >= '3.5.2'
tqdm==4.65.0 ; python_version >= '3.7'
trio==0.22.2 ; python_version >= '3.7'
trio-websocket==0.10.3 ; python_version >= '3.7'
typing-extensions==4.7.1 ; python_version >= '3.7'
typing-inspect==0.9.0
tzlocal==5.0.1 ; python_version >= '3.7'
uritemplate==4.1.1 ; python_version >= '3.6'
urllib3==1.26.16 ; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4, 3.5'
uvicorn==0.22.0
uwsgi==2.0.22
vine==1.3.0 ; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'
vk-api==11.9.9
vk-url-scraper==0.3.24 ; python_version >= '3.7'
warcio==1.7.4
websockets==11.0.3 ; python_version >= '3.7'
werkzeug==2.3.6 ; python_version >= '3.8'
wsproto==1.2.0 ; python_full_version >= '3.7.0'
yarl==1.9.2 ; python_version >= '3.7'
yt-dlp==2023.7.6 ; python_version >= '3.7'