Skip to content
Snippets Groups Projects
Commit 9fb62d72 authored by Martin Weise's avatar Martin Weise
Browse files

Merge branch 'master' of gitlab.phaidra.org:fair-data-austria-db-repository/fda-docs

parents 64db2425 beec5000
No related branches found
No related tags found
No related merge requests found
Showing
with 192 additions and 55 deletions
......@@ -4,6 +4,16 @@ node_modules/
*.bkp
swagger/**/docs/*.md
## macOS
.DS_Store
.idea/
## Docker Hub
dockerhub/.env
## Virtual Environment
venv/
## Core latex/pdflatex auxiliary files:
*.aux
*.lof
......
# Default ignored files
/shelf/
/workspace.xml
# Editor-based HTTP Client requests
/httpRequests/
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml
<?xml version="1.0" encoding="UTF-8"?>
<module type="PYTHON_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
\ No newline at end of file
<component name="InspectionProjectProfileManager">
<settings>
<option name="USE_PROJECT_PROFILE" value="false" />
<version value="1.0" />
</settings>
</component>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.6" project-jdk-type="Python SDK" />
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/fda-docs.iml" filepath="$PROJECT_DIR$/.idea/fda-docs.iml" />
</modules>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>
\ No newline at end of file
......@@ -4,13 +4,21 @@ ENV PYTHONUNBUFFERED=1
RUN apt-get update && apt-get install -y python3 python3-pip python3-cffi python3-brotli libpango-1.0-0 libpangoft2-1.0-0
COPY ./requirements.txt ./requirements.txt
COPY requirements.txt ./requirements.txt
RUN pip3 install -r ./requirements.txt
RUN python3 --version
RUN mkdocs --version
COPY ./docs ./docs
COPY ./docs/images ./docs/images
COPY ./docs/operation ./docs/operation
COPY ./docs/stylesheets ./docs/stylesheets
COPY ./docs/videos ./docs/videos
COPY ./docs/contact.md ./docs/contact.md
COPY ./docs/getting-started.md ./docs/getting-started.md
COPY ./docs/index.md ./docs/index.md
COPY ./docs/publications.md ./docs/publications.md
COPY ./docs/system.md ./docs/system.md
COPY ./mkdocs.yml ./mkdocs.yml
RUN echo 'plugins:\n\
......
phony:
.PHONY: clean
all:
all: build
clean:
release-deps:
pip3 install -r ./dockerhub/requirements.txt
release: release-deps
python3 ./dockerhub/release.py
build:
docker-compose build
run: build
docker-compose up
sudo mv ./site/pdf/document.pdf ./site/pdf/documentation.pdf
docs:
widdershins --environment ./misc/env.json ./misc/api-authentication.yaml -o ./docs/operation/endpoints/authentication.md
widdershins --environment ./misc/env.json ./misc/api-container.yaml -o ./docs/operation/endpoints/container.md
widdershins --environment ./misc/env.json ./misc/api-database.yaml -o ./docs/operation/endpoints/database.md
widdershins --environment ./misc/env.json ./misc/api-identifier.yaml -o ./docs/operation/endpoints/identifier.md
widdershins --environment ./misc/env.json ./misc/api-query.yaml -o ./docs/operation/endpoints/query.md
deploy: run
install: build
sudo cp -r ./site/* /usr/share/nginx/html/
\ No newline at end of file
......@@ -14,7 +14,7 @@ services:
build: .
image: fda-docs-builder
volumes:
- "./site:/site"
- ./site:/site
networks:
- fda-public
environment:
......
USERNAME=...
PASSWORD=...
\ No newline at end of file
# Quick Reference
* **Maintained by**:
[the DBRepo Maintainers](https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services/-/graphs/master)
* **Where to get help**:
[the official documentation](https://dbrepo-docs.ossdip.at/), [IDCC'22 paper](https://doi.org/10.5281/zenodo.6637333),
[iPRES'21 paper](https://doi.org/10.17605/OSF.IO/B7NX5)
# Supported tags and respective `Dockerfile` links
* [`latest`](https://hub.docker.com/repository/docker/dbrepo/REPOSITORY/tags?page=1&ordering=last_updated&name=latest)
# Quick reference (cont.)
* **Where to file issues**:
Send us an [email](https://tiss.tuwien.ac.at/person/287722.html)
* **Supported architectures:**
`amd64`
* **Source of this description:**
[docs repo's `dockerhub/` directory](https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-docs/-/tree/master/dockerhub)
([history](https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-docs/-/commits/master/dockerhub))
# What is DBRepo?
tbd
import requests as rq
import os
from py_dotenv import read_dotenv
class Dockerhub:
"""A simple Dockerhub client"""
baseurl = "https://hub.docker.com"
username = ""
registry = "registry-1.docker.io"
workpath = os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))
headers = {
"Content-Type": "application/json",
"Authorization": None
}
def __init__(self):
read_dotenv(self.workpath + "/.env")
self.username = os.getenv("USERNAME")
response = rq.post(self.baseurl + "/v2/users/login", {
"username": self.username,
"password": os.getenv("PASSWORD")
})
if response.status_code == 200:
self.headers["Authorization"] = "Bearer " + response.json()["token"]
else:
raise "Failed to authenticate"
def modify_description(self, repository):
header = self.__read__(self.workpath + "/_header.md").replace('REPOSITORY', repository)
body = self.__read__(self.workpath + "/fda-" + repository + ".md")
response = rq.patch(self.baseurl + "/v2/repositories/" + self.username + "/" + repository + "/", headers=self.headers,
json={
"description": "Official repository of DBRepo.",
"full_description": header + "\n\n" + body,
"registry": self.registry
})
if response.status_code == 200:
return response.json()
else:
print(response)
def __read__(self, path):
with open(path, "r") as f:
return ' '.join([line for line in f.readlines()])
\ No newline at end of file
File added
File added
# How to use this image
```console
$ docker run -v /var/run/docker.sock:/var/run/docker.sock -v /tmp:/tmp -p 5000:5000
```
## Swagger Endpoints
* **OpenAPI**:
http://localhost:5000/swagger-ui/
* **OpenAPI `.json`**:
http://localhost:5000/api-analyze.json
# How to use this image
```console
$ docker run -p 9097:9097 -e SPRING_PROFILES_ACTIVE=docker
```
## Swagger Endpoints
* **OpenAPI**:
http://localhost:9097/swagger-ui/index.html
* **OpenAPI `.json`**:
http://localhost:9097/v3/api-docs/
* **OpenAPI `.yaml`**:
http://localhost:9097/v3/api-docs.yaml
# How to use this image
```console
$ docker run -v ./fda-broker-service-data:/var/lib/rabbitmq/ -p 9098:9098 -p 5672:5672 -p 15672:15672
```
## Swagger Endpoints
* **OpenAPI**:
http://localhost:9098/swagger-ui/index.html
* **OpenAPI `.json`**:
http://localhost:9098/v3/api-docs/
* **OpenAPI `.yaml`**:
http://localhost:9098/v3/api-docs.yaml
## RabbitMQ Endpoints
* **Management**:
http://localhost:15672/
# How to use this image
```console
$ docker run -p 9091:9091 -v /var/run/docker.sock:/var/run/docker.sock -e SPRING_PROFILES_ACTIVE=docker
```
## Swagger Endpoints
* **OpenAPI**:
http://localhost:9091/swagger-ui/index.html
* **OpenAPI `.json`**:
http://localhost:9091/v3/api-docs/
* **OpenAPI `.yaml`**:
http://localhost:9091/v3/api-docs.yaml
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment