-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: rename to data-manager, save car to -car instead of /car, integ…
…rate minio for local s3 testing
- Loading branch information
luzzifoss
committed
Jan 25, 2024
1 parent
f19b1b9
commit ebdd5d8
Showing
11 changed files
with
49 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,10 @@ | ||
HOST="127.0.0.1" | ||
PORT="1234" | ||
JWT_SECRET="foo" | ||
DB_CONNECTION_STRING="postgresql://user:[email protected]:5432/data-uploader" | ||
DB_CONNECTION_STRING="postgresql://user:[email protected]:5432/data-manager" | ||
W3UP_PRINCIPAL_KEY="foo" | ||
W3UP_DELEGATION_PROOF="foo" | ||
S3_BUCKET="foo" | ||
S3_ACCESS_KEY_ID="foo" | ||
S3_SECRET_ACCESS_KEY="foo" | ||
S3_ENDPOINT="http://127.0.0.1:9000" | ||
S3_BUCKET="data-manager-test-bucket" | ||
S3_ACCESS_KEY_ID="data-manager-test-access-key" | ||
S3_SECRET_ACCESS_KEY="data-manager-test-secret-key" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,20 @@ | ||
version: "3" | ||
services: | ||
postgres: | ||
container_name: postgres | ||
image: postgres:latest | ||
ports: | ||
- 127.0.0.1:5432:5432 | ||
environment: | ||
POSTGRES_USER: user | ||
POSTGRES_PASSWORD: password | ||
postgres: | ||
container_name: postgres | ||
image: postgres:latest | ||
ports: | ||
- 127.0.0.1:5432:5432 | ||
environment: | ||
POSTGRES_USER: user | ||
POSTGRES_PASSWORD: password | ||
minio: | ||
container_name: minio | ||
image: bitnami/minio:latest | ||
ports: | ||
- 9000:9000 | ||
- 9001:9001 | ||
environment: | ||
- MINIO_ROOT_USER=user | ||
- MINIO_ROOT_PASSWORD=password | ||
- MINIO_DEFAULT_BUCKETS=data-manager-test-bucket |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
{ | ||
"type": "module", | ||
"private": true, | ||
"name": "@carrot-kpi/data-uploader", | ||
"name": "@carrot-kpi/data-manager", | ||
"version": "0.1.0", | ||
"author": "Federico Luzzi <[email protected]>", | ||
"license": "GPL-3.0-or-later", | ||
"description": "A service to facilitate generic data uploads to different services.", | ||
"description": "A service to facilitate data management in Carrot.", | ||
"scripts": { | ||
"prepare": "node ./scripts/prepare.js", | ||
"commitlint": "commitlint -e", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
export const JWT_ISSUER = "carrot-data-uploader"; | ||
export const JWT_ISSUER = "carrot-data-manager"; | ||
export const NONCE_LENGTH_BYTES = 32; | ||
export const SCOPE_S3 = "s3" | ||
export const SCOPE_IPFS = "ipfs" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -54,9 +54,9 @@ const start = async () => { | |
plugin: HapiSwaggerPlugin, | ||
options: { | ||
info: { | ||
title: "Data uploader API", | ||
title: "Data manager API", | ||
version: "1.0.0", | ||
description: "An API to access various storage services.", | ||
description: "An API to manage data in Carrot.", | ||
contact: { | ||
name: "Carrot Labs", | ||
email: "[email protected]", | ||
|
@@ -79,10 +79,12 @@ const start = async () => { | |
delegationProof: W3UP_DELEGATION_PROOF, | ||
}); | ||
|
||
const S3_ENDPOINT = process.env.S3_ENDPOINT; | ||
const S3_BUCKET = requireEnv({ name: "S3_BUCKET" }); | ||
const S3_ACCESS_KEY_ID = requireEnv({ name: "S3_ACCESS_KEY_ID" }); | ||
const S3_SECRET_ACCESS_KEY = requireEnv({ name: "S3_SECRET_ACCESS_KEY" }); | ||
const s3Client = getS3Client({ | ||
endpoint: S3_ENDPOINT, | ||
accessKeyId: S3_ACCESS_KEY_ID, | ||
secretAccessKey: S3_SECRET_ACCESS_KEY, | ||
}); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters