Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support additional upload to s3 service of choice #2

Merged
merged 2 commits into from
Jan 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
HOST=127.0.0.1
PORT=1234
HOST="127.0.0.1"
PORT="1234"
W3UP_PRINCIPAL_KEY="foo"
W3UP_DELEGATION_PROOF="bar"
W3UP_DELEGATION_PROOF="foo"
S3_ENDPOINT="http://foo.bar"
S3_BUCKET="foo"
S3_ACCESS_KEY_ID="foo"
S3_SECRET_ACCESS_KEY="foo"
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ FROM base as runner
COPY --from=prod-deps /app/node_modules /app/node_modules
COPY --from=build /app/out/index.mjs /app/index.mjs

RUN addgroup -S w3up-uploader-runners
RUN adduser -S -G w3up-uploader-runners w3up-uploader-runner
USER w3up-uploader-runner
RUN addgroup -S data-uploader-runners
RUN adduser -S -G data-uploader-runners data-uploader-runner
USER data-uploader-runner

ARG HOST
ENV HOST=$HOST
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"type": "module",
"private": true,
"name": "@carrot-kpi/w3up-uploader",
"name": "@carrot-kpi/data-uploader",
"version": "0.1.0",
"author": "Federico Luzzi <[email protected]>",
"license": "GPL-3.0-or-later",
"description": "A service to facilitate data uploads to web3.storage through their w3up service.",
"description": "A service to facilitate data uploads to web3.storage through their w3up service and to a S3 service of choice.",
"scripts": {
"prepare": "node ./scripts/prepare.js",
"commitlint": "commitlint -e",
Expand All @@ -30,6 +30,7 @@
"prettier": "^3.2.4"
},
"dependencies": {
"@aws-sdk/client-s3": "^3.490.0",
"@hapi/boom": "^10.0.1",
"@hapi/hapi": "^21.3.2",
"@ipld/car": "^5.2.6",
Expand Down
Loading