Skip to content
Snippets Groups Projects
Unverified Commit 1f8dd40b authored by Martin Weise's avatar Martin Weise
Browse files

Updated docs

parent 965fe67a
No related branches found
No related tags found
3 merge requests!231CI: Remove build for log-service,!228Better error message handling in the frontend,!223Release of version 1.4.0
---
author: Martin Weise
---
# Upload Service
## tl;dr
!!! debug "Debug Information"
Image: [tusproject/tusd:v1.12`](https://hub.docker.com/r/tusproject/tusd)
* Ports: 1080/tcp
* Prometheus: `http://<hostname>:1080/api/upload/metrics`
* API: `http://<hostname>:1080/api/upload`
## Overview
We use the [TUS](https://tus.io/) open protocol for resumable file uploads which based entirely on HTTP.
### Examples
Upload a CSV-file into the `dbrepo-upload` bucket with the console
via `http://<hostname>/admin/storage/browser/dbrepo-upload`.
We recommend using a TUS-compatible client:
* [tus-java-client](https://github.com/tus/tus-java-client) (Java)
* [tus-js-client](https://github.com/tus/tus-js-client) (JavaScript/Node.js)
* [tusd](https://github.com/tus/tusd) (Go)
## Limitations
* No support for authentication.
!!! question "Do you miss functionality? Do these limitations affect you?"
We strongly encourage you to help us implement it as we are welcoming contributors to open-source software and get
in [contact](../contact) with us, we happily answer requests for collaboration with attached CV and your programming
experience!
## Security
1. We strongly encourage to limit the clients allowed to upload by adding your subnet, e.g. `128.130.0.0/16`
(=TU Wien subnet) to the [Gateway Service](../system-services-gateway) configuration file like this:
```nginx title="dbrepo.conf"
location /api/upload {
allow 128.130.0.0/16;
deny all;
...
}
```
...@@ -179,7 +179,7 @@ services: ...@@ -179,7 +179,7 @@ services:
environment: environment:
S3_STORAGE_ENDPOINT: "${STORAGE_ENDPOINT:-http://storage-service:9000}" S3_STORAGE_ENDPOINT: "${STORAGE_ENDPOINT:-http://storage-service:9000}"
S3_ACCESS_KEY_ID: "${STORAGE_USERNAME:-minioadmin}" S3_ACCESS_KEY_ID: "${STORAGE_USERNAME:-minioadmin}"
S3_SECRET_ACCESS_KEY: ${STORAGE_PASSWORD:-minioadmin} S3_SECRET_ACCESS_KEY: "${STORAGE_PASSWORD:-minioadmin}"
volumes: volumes:
- "${SHARED_FILESYSTEM:-/tmp}:/tmp" - "${SHARED_FILESYSTEM:-/tmp}:/tmp"
healthcheck: healthcheck:
...@@ -361,6 +361,32 @@ services: ...@@ -361,6 +361,32 @@ services:
logging: logging:
driver: json-file driver: json-file
dbrepo-upload-service:
restart: "no"
container_name: dbrepo-upload-service
hostname: upload-service
image: docker.io/tusproject/tusd:v1.12
ports:
- "1080:1080"
command:
- "--base-path=/api/upload/files/"
- "-s3-endpoint=${STORAGE_ENDPOINT:-http://storage-service:9000}"
- "-s3-bucket=dbrepo-upload"
environment:
AWS_ACCESS_KEY_ID: "${STORAGE_USERNAME:-minioadmin}"
AWS_SECRET_ACCESS_KEY: "${STORAGE_PASSWORD:-minioadmin}"
AWS_REGION: "${STORAGE_REGION_NAME:-eu-west-1}"
depends_on:
dbrepo-storage-service:
condition: service_healthy
healthcheck:
test: wget -qO- localhost:1080/metrics | grep "tusd" || exit 1
interval: 10s
timeout: 5s
retries: 12
logging:
driver: json-file
dbrepo-mirror-service: dbrepo-mirror-service:
restart: "no" restart: "no"
container_name: dbrepo-mirror-service container_name: dbrepo-mirror-service
......
...@@ -22,6 +22,7 @@ nav: ...@@ -22,6 +22,7 @@ nav:
- Data Service: system-services-data.md - Data Service: system-services-data.md
- Metadata Service: system-services-metadata.md - Metadata Service: system-services-metadata.md
- Mirror Service: system-services-mirror.md - Mirror Service: system-services-mirror.md
- Upload Service: system-services-upload.md
- Storage Service: system-services-storage.md - Storage Service: system-services-storage.md
- Databases: - Databases:
- Auth Database: system-databases-auth.md - Auth Database: system-databases-auth.md
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment