Merge pull request #390 from kimmoal/docker-fixes

Fixes in docker-compose deployment
pull/391/head
Raphaël Vinot 2022-04-10 12:28:06 +02:00 committed by GitHub
commit b7ee3a7ecb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 1 deletions

View File

@ -23,3 +23,4 @@ RUN mkdir cache user_agents scraped
RUN poetry install
RUN echo LOOKYLOO_HOME="'`pwd`'" > .env
RUN poetry run tools/3rdparty.py
RUN poetry run tools/generate_sri.py

View File

@ -3,6 +3,7 @@
import logging
import os
from datetime import datetime, timedelta
import shutil
from lookyloo.default import AbstractManager
from lookyloo.exceptions import MissingUUID, NoValidHarFile
@ -61,7 +62,7 @@ class BackgroundIndexer(AbstractManager):
self.logger.warning(f'Unable to build pickle for {uuid}: {uuid_path.parent.name}')
# The capture is not working, moving it away.
self.lookyloo.redis.hdel('lookup_dirs', uuid)
uuid_path.parent.rename(self.discarded_captures_dir / uuid_path.parent.name)
shutil.move(uuid_path.parent, (self.discarded_captures_dir / uuid_path.parent.name))
def _check_indexes(self):
index_redis = self.lookyloo.indexing.redis

View File

@ -38,6 +38,7 @@ services:
- ./cache:/lookyloo/cache
- ./indexing:/lookyloo/indexing
- ./scraped:/lookyloo/scraped
- ./discarded:/lookyloo/discarded_captures
- ./user_agents:/lookyloo/user_agents
- ./config:/lookyloo/config
ports: