Commit b9649062 authored by Jonas Waeber's avatar Jonas Waeber
Browse files

Optimize some dependencies

parent 3ad999b8
Pipeline #37172 failed with stages
in 42 seconds
FROM index.docker.io/library/python:3.8-alpine
FROM index.docker.io/library/python:3.8
ARG K8S_VERSION=v1.20.4
ARG HELM_VERSION=v3.6.3
......@@ -19,13 +19,12 @@ RUN cd /usr/bin \
WORKDIR /
ADD setup.py /
RUN mkdir import_api_app \
&& pip install -e .
&& pip install --no-cache-dir -e .
WORKDIR /import_api_app
ADD requirements.txt .
ADD import_api_app/pull-charts.sh .
RUN pip install -r requirements.txt \
&& ./pull-charts.sh
RUN ./pull-charts.sh
ADD import_api_app .
\ No newline at end of file
......@@ -21,8 +21,6 @@ from flasgger import Swagger
from flask import send_from_directory, redirect
from flask.logging import default_handler
from flask_restful import Api
from kubernetes import config
from kubernetes.config import ConfigException
from import_api_app.app import app
from import_api_app.helpers.error import ImportApiError
......@@ -37,18 +35,6 @@ from import_api_app.resources.update_record_set import UpdateRecordSet
from import_api_app.resources.write_documents_reports import WriteJobResultToDrupal
from import_api_app.resources.write_groups_reports import WriteTypeReportToDrupal
try:
# to be used when inside a kubernetes cluster
config.load_incluster_config()
except ConfigException:
try:
# use .kube directory
# for local development
config.load_kube_config()
except ConfigException:
app.logger.error('No configuration for any Kubernetes Cluster detected.')
raise ImportApiError('No configuration for any Kubernetes Cluster detected.')
environ['HELM_EXPERIMENTAL_OCI'] = '1'
# If app is started via gunicorn
......
Flask
kubernetes
flask-restful
flasgger
flake8
autopep8
pytest
pre-commit
jsonapi-requests
requests
kafka-python
pysftp
pyyaml
paramiko
gunicorn
\ No newline at end of file
......@@ -20,6 +20,12 @@ setup(
packages=['import_api_app'],
include_package_data=True,
install_requires=[
'gunicorn',
'flask',
'paramiko',
'requests',
'kafka-python',
'flask-restful',
'flasgger'
],
)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment