Commit 7eae88a0 authored by Dimitrios Laskaratos's avatar Dimitrios Laskaratos
Browse files

Merge branch 'dev' into 'main'

Dev

See merge request !3
parents a48e0e8a 531519ea
Loading
Loading
Loading
Loading
+4 −25
Original line number Diff line number Diff line
FROM python:3.9-alpine

#RUN apk add git
FROM python:3.12-alpine

RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app

#RUN apk add --no-cache --virtual .build-deps gcc musl-dev

#RUN apk update && apk add python3-dev \
#                        gcc \
#                        libc-dev


#THIS SOLVED THE ISSUE WITH CFFI: building wheel for cffi (setup.py) finished with status 'error'!
#RUN apk add --no-cache libffi-dev build-base
#
COPY requirements.txt /usr/src/app/
#RUN pip3 install connexion

#ENV EMP_STORAGE_DRIVER mongo
#ENV EMP_STORAGE_URI mongodb://203.0.113.8:27017
#
#ENV PIP_ROOT_USER_ACTION=ignore
#
ENV PYTHONUNBUFFERED=1
#RUN apk add --update --no-cache python3 && ln -sf python3 /usr/bin/python
#RUN python3 -m ensurepip

#RUN pip3 install --no-cache --upgrade pip setuptools
RUN python3 -m venv .venv
RUN source .venv/bin/activate

RUN pip3 install --upgrade pip

RUN pip3 install wheel
RUN pip3 install wheel --trusted-host pypi.org --trusted-host pypi.python.org --trusted-host=files.pythonhosted.org

#RUN pip3 install --no-cache --upgrade setuptools
RUN pip3 install --trusted-host pypi.org --trusted-host pypi.python.org --trusted-host=files.pythonhosted.org --no-cache-dir -r requirements.txt

COPY . /usr/src/app
+5 −33
Original line number Diff line number Diff line
#connexion >= 2.6.0
#connexion[swagger-ui] >= 2.6.0
#python_dateutil == 2.6.0
#setuptools >= 21.0.0
#swagger-ui-bundle >= 0.0.2
#requests
#pymongo
#logging
#traceback
#pprint

#connexion >= 2.6.0
#connexion == 2.5.0 used in python 3.5 running server for dev
#connexion #for test
connexion<3.0.0
connexion[swagger-ui]
python_dateutil == 2.6.0
setuptools >= 21.0.0
#setuptools==50.3.2
pymongo==3.12.0
#git+https://github.com/kubernetes-client/python.git
requests==2.25.1
#kubernetes==17.17.0
kubernetes==18.20.0

python-jose[cryptography]
cffi==1.15.1
#bcrypt
#bcrypt==3.1.7 #used in python 3.5 running server for dev

requests==2.32.4
psycopg2-binary
#psycopg2==2.7.7 #used in python 3.5 running server for dev

#not used!
#pandas==0.24.2
paramiko>=2.12.0
urllib3 
pydantic-extra-types==2.10.3
sunrise6g-opensdk==1.0.2.post3
 No newline at end of file
+4 −7
Original line number Diff line number Diff line
#!/usr/bin/env python3

import connexion

import logging
import sys
import os
import src.encoder as encoder
from json import JSONEncoder

from src import encoder

import urllib3
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
def main():
    global driver
    logging.basicConfig(level=logging.INFO)
    app = connexion.App(__name__, specification_dir='./swagger/')
    app.app.json_encoder = encoder.JSONEncoder
    app.add_api('swagger.yaml', strict_validation=True, arguments={'title': 'π-edge Controller API'}, pythonic_params=True)
    app.app.json_encoder = JSONEncoder
    app.add_api('swagger.yaml', strict_validation=True, arguments={'title': 'Service Resource Manager Controller API'}, pythonic_params=True)
    app.run(port=8080)
    

+0 −0

Empty file deleted.

+0 −0

Empty file deleted.

Loading