From b0590f3712b91a9077b607bd2b286c58e5db701c Mon Sep 17 00:00:00 2001 From: "rory.meyer" Date: Thu, 30 Sep 2021 14:28:40 +0000 Subject: [PATCH 1/2] Changed the dir structure a little, renamed app.py to main.py, created a simple docker-compose file for comfort. --- Dockerfile | 10 ++-- app.py | 128 ----------------------------------------------- gunicorn.sh | 3 -- projects.json | 1 - requirements.txt | 4 -- test_api.http | 16 ------ workflows.json | 1 - 7 files changed, 5 insertions(+), 158 deletions(-) delete mode 100644 app.py delete mode 100644 gunicorn.sh delete mode 100644 projects.json delete mode 100644 requirements.txt delete mode 100644 test_api.http delete mode 100644 workflows.json diff --git a/Dockerfile b/Dockerfile index c27960f..7863d37 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,11 +1,11 @@ # init base image (Alpine is small Linux distro) -FROM python:3.8-alpine +FROM tiangolo/uvicorn-gunicorn-fastapi:python3.9 # define the present working directory -WORKDIR /rocrate-maker-fast-api +# WORKDIR /rocrate-maker-fast-api # copy the contents into the working dir -ADD . /rocrate-maker-fast-api +COPY ./app /app # run pip install to install dependencies of the flasdk app -RUN pip install -r requirements.txt +#RUN pip install -r requirements.txt # define commnd to start the api webserver # CMD [ "python","app.py"] -ENTRYPOINT [ "./gunicorn.sh" ] \ No newline at end of file +#ENTRYPOINT [ "./gunicorn.sh" ] diff --git a/app.py b/app.py deleted file mode 100644 index a2a0ef9..0000000 --- a/app.py +++ /dev/null @@ -1,128 +0,0 @@ -from fastapi import FastAPI, Path, Query -from pydantic import BaseModel, Field -from typing import Optional -import os, json - -app = FastAPI( - title = 'RO-Crate-API', - description='RO-Crate manager Rest-API' -) - -class ProfileModel(BaseModel): - logo: Optional[str] = Field(None, example = 'https://www.researchobject.org/ro-crate/assets/img/ro-crate-w-text.png', description = "Logo to be displayed in RO crate UI") - description: Optional[str] = Field(None, description = "description of the RO-profile") - url_ro_profile: str = Field(None, description = "github url where the rocrate profile is located") - -class SpaceModel(BaseModel): - storage_path: str = Field(None, description = "Valid path on local storage where ROcrate data will be stored") - RO_profile: str = Field(None, description = "Ro-Profile name that will be used for the space") - -@app.get('/', tags=["test"]) -def home(): - return {'Message':'Waddup Rory, docs can be found in the /docs route'} - -@app.get('/profiles',tags=["Profiles"]) -def get_all_profiles_info(): - with open(os.path.join(os.getcwd(),"workflows.json"), "r+") as file: - data = json.load(file) - return data - -@app.get('/profiles/{profile_id}',tags=["Profiles"]) -def get_profile_info(profile_id: str = Path(None,description="profile_id name")): - with open(os.path.join(os.getcwd(),"workflows.json"), "r+") as file: - data = json.load(file) - try: - toreturn = data[profile_id] - return toreturn - except Exception as e: - return {'Data':'Not Found'} - -@app.delete('/profiles/{profile_id}',tags=["Profiles"]) -def delete_profile(profile_id: str = Path(None,description="profile_id name")): - with open(os.path.join(os.getcwd(),"workflows.json")) as data_file: - data = json.load(data_file) - try: - del data[profile_id] - except Exception as e: - return {'Data':'Delete Failed'} - with open(os.path.join(os.getcwd(),"workflows.json"), 'w') as data_file: - data = json.dump(data, data_file) - return {'message':'successfully deleted profile'} - -@app.post('/profiles/{profile_id}',tags=["Profiles"]) -def add_profile(*,profile_id: str = Path(None,description="profile_id name"), item: ProfileModel): - with open(os.path.join(os.getcwd(),"workflows.json"), "r+")as file: - data = json.load(file) - if profile_id in data.keys(): - return {'Error':"Profile already exists"} - data[profile_id]= {'logo':item.logo,'description':item.description,'url_ro_profile':item.url_ro_profile} - with open(os.path.join(os.getcwd(),"workflows.json"), "w") as file: - json.dump(data, file) - return {'Message':'Profile added'} - -@app.put('/profiles/{profile_id}',tags=["Profiles"]) -def update_profile(*,profile_id: str = Path(None,description="profile_id name"), item: ProfileModel): - with open(os.path.join(os.getcwd(),"workflows.json"), "r+")as file: - data = json.load(file) - for profile in data.keys(): - if profile_id == profile: - data[profile_id]= {'logo':item.logo,'description':item.description,'url_ro_profile':item.url_ro_profile} - with open(os.path.join(os.getcwd(),"workflows.json"), "w") as file: - json.dump(data, file) - return {'Data':'Update successfull'} - return {'Error', 'given profile was not found'} - -@app.get('/spaces',tags=["Spaces"]) -def get_all_spaces(): - with open(os.path.join(os.getcwd(),"projects.json"), "r+")as file: - data = json.load(file) - return data - -@app.get('/spaces/{space_id}',tags=["Spaces"]) -def get_space_info(*,space_id: str = Path(None,description="space_id name")): - with open(os.path.join(os.getcwd(),"projects.json"), "r+") as file: - data = json.load(file) - try: - toreturn = data[space_id] - return toreturn - except Exception as e: - return {'Data':'Space Not Found'} - -@app.delete('/spaces/{space_id}',tags=["Spaces"]) -def delete_space(*,space_id: str = Path(None,description="space_id name")): - with open(os.path.join(os.getcwd(),"projects.json")) as data_file: - data = json.load(data_file) - try: - del data[space_id] - except Exception as e: - return {'Data':'Delete Failed'} - with open(os.path.join(os.getcwd(),"projects.json"), 'w') as data_file: - data = json.dump(data, data_file) - return {'message':'successfully deleted space'} - -@app.post('/spaces/{space_id}',tags=["Spaces"]) -def add_space(*,space_id: str = Path(None,description="space_id name"), item: SpaceModel): - with open(os.path.join(os.getcwd(),"projects.json"), "r+")as file: - data = json.load(file) - if space_id in data.keys(): - return {'Error':"Profile already exists"} - data[space_id]= {'storage_path':item.storage_path,'ro_profile':item.RO_profile} - with open(os.path.join(os.getcwd(),"projects.json"), "w") as file: - json.dump(data, file) - return {'Message':'Space added'} - -@app.put('/spaces/{space_id}',tags=["Spaces"]) -def update_space(*,space_id: str = Path(None,description="space_id name"), item: SpaceModel): - with open(os.path.join(os.getcwd(),"projects.json"), "r+")as file: - data = json.load(file) - for space in data.keys(): - if space_id == space: - data[space_id]= {'storage_path':item.storage_path,'ro_profile':item.RO_profile} - with open(os.path.join(os.getcwd(),"projects.json"), "w") as file: - json.dump(data, file) - return {'Data':'Update successfull'} - return {'Error', 'given space was not found'} - -@app.get('/plugins', tags=["plugins"]) -def get_al_plugin_info(): - return {'data': 'TODO'} \ No newline at end of file diff --git a/gunicorn.sh b/gunicorn.sh deleted file mode 100644 index 35ddfd5..0000000 --- a/gunicorn.sh +++ /dev/null @@ -1,3 +0,0 @@ -#! /bin/sh - -gunicorn --chdir app app:app -w 2 --threads 2 -b 0.0.0.0:6656 \ No newline at end of file diff --git a/projects.json b/projects.json deleted file mode 100644 index e4dd5ec..0000000 --- a/projects.json +++ /dev/null @@ -1 +0,0 @@ -{"arms_test": {"storage_path": "new storagestring", "ro_profile": "hehehe"}} \ No newline at end of file diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index 4329fe5..0000000 --- a/requirements.txt +++ /dev/null @@ -1,4 +0,0 @@ -fastapi -uvicorn -pydantic -gunicorn \ No newline at end of file diff --git a/test_api.http b/test_api.http deleted file mode 100644 index 4a5a9d7..0000000 --- a/test_api.http +++ /dev/null @@ -1,16 +0,0 @@ -GET http://localhost:5000/ HTTP/1.1 - -### - -GET http://localhost:5000/profiles/ARMS_Descriptor HTTP/1.1 -### - -GET http://localhost:5000/profiles HTTP/1.1 - -### - -PUT http://localhost:5000/profiles/test4?logo=testlogo HTTP/1.1 - -### - -DELETE http://localhost:5000/profiles/test4 HTTP/1.1 \ No newline at end of file diff --git a/workflows.json b/workflows.json deleted file mode 100644 index 8193c57..0000000 --- a/workflows.json +++ /dev/null @@ -1 +0,0 @@ -{"OSD_Descriptor": {"data": {"url_picture": "https://avatars.githubusercontent.com/u/86710073?s=400&u=2a27e961d29c4e8d54391afa9807d32e04682cd5&v=4", "Plugins": {"RemoteSourcePlugin": {"downloadURL": "https://gitlab.vliz.be/datac/remotesourcepluginlink", "name": "RemoteSourcePlugin", "release": "1.0.0"}}, "Project_Metadata": {"Description": "text", "author": "text", "email contactperson": "email"}, "Remote_Sources": {"release": "1.0.0", "ROCrate_Semantic": "https://www.researchobject.org/ro-crate/1.1/context.jsonld"}, "downloadURL": "https://test.be"}, "downloadURL": "https://gitlab.vliz.be/datac", "name": "Test_Descriptor", "release": "1.0.0"}, "ARMS_Descriptor": {"data": {"url_picture": "https://avatars.githubusercontent.com/u/86344728?s=400&u=10a7d82d31cefae8df2906c9952ec0ff7537f890&v=4", "Plugins": {"RemoteSourcePlugin": {"downloadURL": "https://gitlab.vliz.be/datac/remotesourcepluginlink", "name": "RemoteSourcePlugin", "release": "1.0.0"}}, "Project_Metadata": {"Description": "text", "author": "text", "email contactperson": "email", "ARMS_unit": "text"}, "Remote_Sources": {"release": "1.0.0", "ROCrate_Semantic": "https://www.researchobject.org/ro-crate/1.1/context.jsonld"}, "downloadURL": "https://test.be"}, "downloadURL": "https://gitlab.vliz.be/datac", "name": "Test_Descriptor", "release": "1.0.0"}, "test_profile_git": {"roprourl": "testurlfind.com", "url": null}, "love_you": {"logo": "https://www.researchobject.org/ro-crate/assets/img/ro-crate-w-text.png", "description": "sdvfiugdgiulwdvsl", "url_ro_profile": "sdwfw"}} \ No newline at end of file From e0eb1577d68157aad80fa2b071c0b0bcf55f7802 Mon Sep 17 00:00:00 2001 From: "rory.meyer" Date: Thu, 30 Sep 2021 14:41:25 +0000 Subject: [PATCH 2/2] Changed the dir structure a little, renamed app.py to main.py, created a simple docker-compose file for comfort. --- app/app.py | 128 +++++++++++++++++++++++++++++++++++++++++++ app/gunicorn.sh | 3 + app/main.py | 128 +++++++++++++++++++++++++++++++++++++++++++ app/projects.json | 1 + app/requirements.txt | 4 ++ app/test_api.http | 16 ++++++ app/workflows.json | 1 + docker-compose.yaml | 7 +++ 8 files changed, 288 insertions(+) create mode 100644 app/app.py create mode 100644 app/gunicorn.sh create mode 100644 app/main.py create mode 100644 app/projects.json create mode 100644 app/requirements.txt create mode 100644 app/test_api.http create mode 100644 app/workflows.json create mode 100644 docker-compose.yaml diff --git a/app/app.py b/app/app.py new file mode 100644 index 0000000..a2a0ef9 --- /dev/null +++ b/app/app.py @@ -0,0 +1,128 @@ +from fastapi import FastAPI, Path, Query +from pydantic import BaseModel, Field +from typing import Optional +import os, json + +app = FastAPI( + title = 'RO-Crate-API', + description='RO-Crate manager Rest-API' +) + +class ProfileModel(BaseModel): + logo: Optional[str] = Field(None, example = 'https://www.researchobject.org/ro-crate/assets/img/ro-crate-w-text.png', description = "Logo to be displayed in RO crate UI") + description: Optional[str] = Field(None, description = "description of the RO-profile") + url_ro_profile: str = Field(None, description = "github url where the rocrate profile is located") + +class SpaceModel(BaseModel): + storage_path: str = Field(None, description = "Valid path on local storage where ROcrate data will be stored") + RO_profile: str = Field(None, description = "Ro-Profile name that will be used for the space") + +@app.get('/', tags=["test"]) +def home(): + return {'Message':'Waddup Rory, docs can be found in the /docs route'} + +@app.get('/profiles',tags=["Profiles"]) +def get_all_profiles_info(): + with open(os.path.join(os.getcwd(),"workflows.json"), "r+") as file: + data = json.load(file) + return data + +@app.get('/profiles/{profile_id}',tags=["Profiles"]) +def get_profile_info(profile_id: str = Path(None,description="profile_id name")): + with open(os.path.join(os.getcwd(),"workflows.json"), "r+") as file: + data = json.load(file) + try: + toreturn = data[profile_id] + return toreturn + except Exception as e: + return {'Data':'Not Found'} + +@app.delete('/profiles/{profile_id}',tags=["Profiles"]) +def delete_profile(profile_id: str = Path(None,description="profile_id name")): + with open(os.path.join(os.getcwd(),"workflows.json")) as data_file: + data = json.load(data_file) + try: + del data[profile_id] + except Exception as e: + return {'Data':'Delete Failed'} + with open(os.path.join(os.getcwd(),"workflows.json"), 'w') as data_file: + data = json.dump(data, data_file) + return {'message':'successfully deleted profile'} + +@app.post('/profiles/{profile_id}',tags=["Profiles"]) +def add_profile(*,profile_id: str = Path(None,description="profile_id name"), item: ProfileModel): + with open(os.path.join(os.getcwd(),"workflows.json"), "r+")as file: + data = json.load(file) + if profile_id in data.keys(): + return {'Error':"Profile already exists"} + data[profile_id]= {'logo':item.logo,'description':item.description,'url_ro_profile':item.url_ro_profile} + with open(os.path.join(os.getcwd(),"workflows.json"), "w") as file: + json.dump(data, file) + return {'Message':'Profile added'} + +@app.put('/profiles/{profile_id}',tags=["Profiles"]) +def update_profile(*,profile_id: str = Path(None,description="profile_id name"), item: ProfileModel): + with open(os.path.join(os.getcwd(),"workflows.json"), "r+")as file: + data = json.load(file) + for profile in data.keys(): + if profile_id == profile: + data[profile_id]= {'logo':item.logo,'description':item.description,'url_ro_profile':item.url_ro_profile} + with open(os.path.join(os.getcwd(),"workflows.json"), "w") as file: + json.dump(data, file) + return {'Data':'Update successfull'} + return {'Error', 'given profile was not found'} + +@app.get('/spaces',tags=["Spaces"]) +def get_all_spaces(): + with open(os.path.join(os.getcwd(),"projects.json"), "r+")as file: + data = json.load(file) + return data + +@app.get('/spaces/{space_id}',tags=["Spaces"]) +def get_space_info(*,space_id: str = Path(None,description="space_id name")): + with open(os.path.join(os.getcwd(),"projects.json"), "r+") as file: + data = json.load(file) + try: + toreturn = data[space_id] + return toreturn + except Exception as e: + return {'Data':'Space Not Found'} + +@app.delete('/spaces/{space_id}',tags=["Spaces"]) +def delete_space(*,space_id: str = Path(None,description="space_id name")): + with open(os.path.join(os.getcwd(),"projects.json")) as data_file: + data = json.load(data_file) + try: + del data[space_id] + except Exception as e: + return {'Data':'Delete Failed'} + with open(os.path.join(os.getcwd(),"projects.json"), 'w') as data_file: + data = json.dump(data, data_file) + return {'message':'successfully deleted space'} + +@app.post('/spaces/{space_id}',tags=["Spaces"]) +def add_space(*,space_id: str = Path(None,description="space_id name"), item: SpaceModel): + with open(os.path.join(os.getcwd(),"projects.json"), "r+")as file: + data = json.load(file) + if space_id in data.keys(): + return {'Error':"Profile already exists"} + data[space_id]= {'storage_path':item.storage_path,'ro_profile':item.RO_profile} + with open(os.path.join(os.getcwd(),"projects.json"), "w") as file: + json.dump(data, file) + return {'Message':'Space added'} + +@app.put('/spaces/{space_id}',tags=["Spaces"]) +def update_space(*,space_id: str = Path(None,description="space_id name"), item: SpaceModel): + with open(os.path.join(os.getcwd(),"projects.json"), "r+")as file: + data = json.load(file) + for space in data.keys(): + if space_id == space: + data[space_id]= {'storage_path':item.storage_path,'ro_profile':item.RO_profile} + with open(os.path.join(os.getcwd(),"projects.json"), "w") as file: + json.dump(data, file) + return {'Data':'Update successfull'} + return {'Error', 'given space was not found'} + +@app.get('/plugins', tags=["plugins"]) +def get_al_plugin_info(): + return {'data': 'TODO'} \ No newline at end of file diff --git a/app/gunicorn.sh b/app/gunicorn.sh new file mode 100644 index 0000000..35ddfd5 --- /dev/null +++ b/app/gunicorn.sh @@ -0,0 +1,3 @@ +#! /bin/sh + +gunicorn --chdir app app:app -w 2 --threads 2 -b 0.0.0.0:6656 \ No newline at end of file diff --git a/app/main.py b/app/main.py new file mode 100644 index 0000000..a2a0ef9 --- /dev/null +++ b/app/main.py @@ -0,0 +1,128 @@ +from fastapi import FastAPI, Path, Query +from pydantic import BaseModel, Field +from typing import Optional +import os, json + +app = FastAPI( + title = 'RO-Crate-API', + description='RO-Crate manager Rest-API' +) + +class ProfileModel(BaseModel): + logo: Optional[str] = Field(None, example = 'https://www.researchobject.org/ro-crate/assets/img/ro-crate-w-text.png', description = "Logo to be displayed in RO crate UI") + description: Optional[str] = Field(None, description = "description of the RO-profile") + url_ro_profile: str = Field(None, description = "github url where the rocrate profile is located") + +class SpaceModel(BaseModel): + storage_path: str = Field(None, description = "Valid path on local storage where ROcrate data will be stored") + RO_profile: str = Field(None, description = "Ro-Profile name that will be used for the space") + +@app.get('/', tags=["test"]) +def home(): + return {'Message':'Waddup Rory, docs can be found in the /docs route'} + +@app.get('/profiles',tags=["Profiles"]) +def get_all_profiles_info(): + with open(os.path.join(os.getcwd(),"workflows.json"), "r+") as file: + data = json.load(file) + return data + +@app.get('/profiles/{profile_id}',tags=["Profiles"]) +def get_profile_info(profile_id: str = Path(None,description="profile_id name")): + with open(os.path.join(os.getcwd(),"workflows.json"), "r+") as file: + data = json.load(file) + try: + toreturn = data[profile_id] + return toreturn + except Exception as e: + return {'Data':'Not Found'} + +@app.delete('/profiles/{profile_id}',tags=["Profiles"]) +def delete_profile(profile_id: str = Path(None,description="profile_id name")): + with open(os.path.join(os.getcwd(),"workflows.json")) as data_file: + data = json.load(data_file) + try: + del data[profile_id] + except Exception as e: + return {'Data':'Delete Failed'} + with open(os.path.join(os.getcwd(),"workflows.json"), 'w') as data_file: + data = json.dump(data, data_file) + return {'message':'successfully deleted profile'} + +@app.post('/profiles/{profile_id}',tags=["Profiles"]) +def add_profile(*,profile_id: str = Path(None,description="profile_id name"), item: ProfileModel): + with open(os.path.join(os.getcwd(),"workflows.json"), "r+")as file: + data = json.load(file) + if profile_id in data.keys(): + return {'Error':"Profile already exists"} + data[profile_id]= {'logo':item.logo,'description':item.description,'url_ro_profile':item.url_ro_profile} + with open(os.path.join(os.getcwd(),"workflows.json"), "w") as file: + json.dump(data, file) + return {'Message':'Profile added'} + +@app.put('/profiles/{profile_id}',tags=["Profiles"]) +def update_profile(*,profile_id: str = Path(None,description="profile_id name"), item: ProfileModel): + with open(os.path.join(os.getcwd(),"workflows.json"), "r+")as file: + data = json.load(file) + for profile in data.keys(): + if profile_id == profile: + data[profile_id]= {'logo':item.logo,'description':item.description,'url_ro_profile':item.url_ro_profile} + with open(os.path.join(os.getcwd(),"workflows.json"), "w") as file: + json.dump(data, file) + return {'Data':'Update successfull'} + return {'Error', 'given profile was not found'} + +@app.get('/spaces',tags=["Spaces"]) +def get_all_spaces(): + with open(os.path.join(os.getcwd(),"projects.json"), "r+")as file: + data = json.load(file) + return data + +@app.get('/spaces/{space_id}',tags=["Spaces"]) +def get_space_info(*,space_id: str = Path(None,description="space_id name")): + with open(os.path.join(os.getcwd(),"projects.json"), "r+") as file: + data = json.load(file) + try: + toreturn = data[space_id] + return toreturn + except Exception as e: + return {'Data':'Space Not Found'} + +@app.delete('/spaces/{space_id}',tags=["Spaces"]) +def delete_space(*,space_id: str = Path(None,description="space_id name")): + with open(os.path.join(os.getcwd(),"projects.json")) as data_file: + data = json.load(data_file) + try: + del data[space_id] + except Exception as e: + return {'Data':'Delete Failed'} + with open(os.path.join(os.getcwd(),"projects.json"), 'w') as data_file: + data = json.dump(data, data_file) + return {'message':'successfully deleted space'} + +@app.post('/spaces/{space_id}',tags=["Spaces"]) +def add_space(*,space_id: str = Path(None,description="space_id name"), item: SpaceModel): + with open(os.path.join(os.getcwd(),"projects.json"), "r+")as file: + data = json.load(file) + if space_id in data.keys(): + return {'Error':"Profile already exists"} + data[space_id]= {'storage_path':item.storage_path,'ro_profile':item.RO_profile} + with open(os.path.join(os.getcwd(),"projects.json"), "w") as file: + json.dump(data, file) + return {'Message':'Space added'} + +@app.put('/spaces/{space_id}',tags=["Spaces"]) +def update_space(*,space_id: str = Path(None,description="space_id name"), item: SpaceModel): + with open(os.path.join(os.getcwd(),"projects.json"), "r+")as file: + data = json.load(file) + for space in data.keys(): + if space_id == space: + data[space_id]= {'storage_path':item.storage_path,'ro_profile':item.RO_profile} + with open(os.path.join(os.getcwd(),"projects.json"), "w") as file: + json.dump(data, file) + return {'Data':'Update successfull'} + return {'Error', 'given space was not found'} + +@app.get('/plugins', tags=["plugins"]) +def get_al_plugin_info(): + return {'data': 'TODO'} \ No newline at end of file diff --git a/app/projects.json b/app/projects.json new file mode 100644 index 0000000..e4dd5ec --- /dev/null +++ b/app/projects.json @@ -0,0 +1 @@ +{"arms_test": {"storage_path": "new storagestring", "ro_profile": "hehehe"}} \ No newline at end of file diff --git a/app/requirements.txt b/app/requirements.txt new file mode 100644 index 0000000..4329fe5 --- /dev/null +++ b/app/requirements.txt @@ -0,0 +1,4 @@ +fastapi +uvicorn +pydantic +gunicorn \ No newline at end of file diff --git a/app/test_api.http b/app/test_api.http new file mode 100644 index 0000000..4a5a9d7 --- /dev/null +++ b/app/test_api.http @@ -0,0 +1,16 @@ +GET http://localhost:5000/ HTTP/1.1 + +### + +GET http://localhost:5000/profiles/ARMS_Descriptor HTTP/1.1 +### + +GET http://localhost:5000/profiles HTTP/1.1 + +### + +PUT http://localhost:5000/profiles/test4?logo=testlogo HTTP/1.1 + +### + +DELETE http://localhost:5000/profiles/test4 HTTP/1.1 \ No newline at end of file diff --git a/app/workflows.json b/app/workflows.json new file mode 100644 index 0000000..8193c57 --- /dev/null +++ b/app/workflows.json @@ -0,0 +1 @@ +{"OSD_Descriptor": {"data": {"url_picture": "https://avatars.githubusercontent.com/u/86710073?s=400&u=2a27e961d29c4e8d54391afa9807d32e04682cd5&v=4", "Plugins": {"RemoteSourcePlugin": {"downloadURL": "https://gitlab.vliz.be/datac/remotesourcepluginlink", "name": "RemoteSourcePlugin", "release": "1.0.0"}}, "Project_Metadata": {"Description": "text", "author": "text", "email contactperson": "email"}, "Remote_Sources": {"release": "1.0.0", "ROCrate_Semantic": "https://www.researchobject.org/ro-crate/1.1/context.jsonld"}, "downloadURL": "https://test.be"}, "downloadURL": "https://gitlab.vliz.be/datac", "name": "Test_Descriptor", "release": "1.0.0"}, "ARMS_Descriptor": {"data": {"url_picture": "https://avatars.githubusercontent.com/u/86344728?s=400&u=10a7d82d31cefae8df2906c9952ec0ff7537f890&v=4", "Plugins": {"RemoteSourcePlugin": {"downloadURL": "https://gitlab.vliz.be/datac/remotesourcepluginlink", "name": "RemoteSourcePlugin", "release": "1.0.0"}}, "Project_Metadata": {"Description": "text", "author": "text", "email contactperson": "email", "ARMS_unit": "text"}, "Remote_Sources": {"release": "1.0.0", "ROCrate_Semantic": "https://www.researchobject.org/ro-crate/1.1/context.jsonld"}, "downloadURL": "https://test.be"}, "downloadURL": "https://gitlab.vliz.be/datac", "name": "Test_Descriptor", "release": "1.0.0"}, "test_profile_git": {"roprourl": "testurlfind.com", "url": null}, "love_you": {"logo": "https://www.researchobject.org/ro-crate/assets/img/ro-crate-w-text.png", "description": "sdvfiugdgiulwdvsl", "url_ro_profile": "sdwfw"}} \ No newline at end of file diff --git a/docker-compose.yaml b/docker-compose.yaml new file mode 100644 index 0000000..6362c13 --- /dev/null +++ b/docker-compose.yaml @@ -0,0 +1,7 @@ +version: '3.7' +services: + fast_api_app: + build: . + ports: + - 8081:80 +