all: purge remaining elasticsearch artifacts

This commit is contained in:
Shyam Sunder
2020-03-07 22:17:51 -05:00
parent 6cc2a91632
commit 1a8de9ef3a
8 changed files with 27 additions and 87 deletions

View File

@ -21,8 +21,6 @@ RUN \
pip3 install --no-cache-dir --disable-pip-version-check \
alembic \
"coloredlogs==5.0" \
"elasticsearch>=5.0.0,<7.0.0" \
"elasticsearch-dsl>=5.0.0,<7.0.0" \
&& exit 0
ARG PUID=1000

View File

@ -144,9 +144,3 @@ privileges:
## usage: schema://user:password@host:port/database_name
## example: postgres://szuru:dog@localhost:5432/szuru_test
#database:
#elasticsearch: # used for reverse image search
# host: localhost
# port: 9200
# index: szurubooru
# user: szurubooru
# pass:

View File

@ -23,8 +23,7 @@ RUN apk --no-cache add \
USER app
ENV POSTGRES_HOST=x \
POSTGRES_USER=x \
POSTGRES_PASSWORD=x \
ESEARCH_HOST=x
POSTGRES_PASSWORD=x
CMD ["pytest", "szurubooru/", \
"--cov-report=term-missing", "--cov=szurubooru", "--tb=short"]
EOF

View File

@ -3,8 +3,6 @@ pyyaml>=3.11
psycopg2-binary>=2.6.1
SQLAlchemy>=1.0.12
coloredlogs==5.0
elasticsearch>=5.0.0,<7.0.0
elasticsearch-dsl>=5.0.0,<7.0.0
certifi>=2017.11.5
numpy>=1.8.2
pillow>=4.3.0

View File

@ -21,12 +21,7 @@ def _merge(left: Dict, right: Dict) -> Dict:
def _docker_config() -> Dict:
for key in [
'POSTGRES_USER',
'POSTGRES_PASSWORD',
'POSTGRES_HOST',
'ESEARCH_HOST'
]:
for key in ['POSTGRES_USER', 'POSTGRES_PASSWORD', 'POSTGRES_HOST']:
if not os.getenv(key, False):
raise errors.ConfigError(f'Environment variable "{key}" not set')
return {
@ -40,13 +35,6 @@ def _docker_config() -> Dict:
'host': os.getenv('POSTGRES_HOST'),
'port': int(os.getenv('POSTGRES_PORT', 5432)),
'db': os.getenv('POSTGRES_DB', os.getenv('POSTGRES_USER'))
},
'elasticsearch': {
'host': os.getenv('ESEARCH_HOST'),
'port': int(os.getenv('ESEARCH_PORT', 9200)),
'index': os.getenv('ESEARCH_INDEX', 'szurubooru'),
'user': os.getenv('ESEARCH_USER', os.getenv('ESEARCH_INDEX', 'szurubooru')),
'pass': os.getenv('ESEARCH_PASSWORD', False)
}
}

View File

@ -120,7 +120,6 @@ def create_app() -> Callable[[Any, Any], Any]:
''' Create a WSGI compatible App object. '''
validate_config()
coloredlogs.install(fmt='[%(asctime)-15s] %(name)s %(message)s')
logging.getLogger('elasticsearch').disabled = True
if config.config['debug']:
logging.getLogger('szurubooru').setLevel(logging.INFO)
if config.config['show_sql']: