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

Pinata proxy service #17

Merged
merged 10 commits into from
Feb 29, 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
3 changes: 2 additions & 1 deletion .github/workflows/build-pinata-to-k8s.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ jobs:
- name: Build and push image
uses: docker/build-push-action@v5
with:
file: indexer/Dockerfile-indexer
context: pinata-proxy
file: pinata-proxy/Dockerfile
push: true
tags: ${{ needs.prepair.outputs.image_name }}

Expand Down
2 changes: 2 additions & 0 deletions pinata-proxy/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
PINATA_API_KEY=..
PINATA_SECRET_API_KEY=..
25 changes: 25 additions & 0 deletions pinata-proxy/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
module.exports = {
parser: '@typescript-eslint/parser',
parserOptions: {
project: 'tsconfig.json',
tsconfigRootDir : __dirname,
sourceType: 'module',
},
plugins: ['@typescript-eslint/eslint-plugin'],
extends: [
'plugin:@typescript-eslint/recommended',
'plugin:prettier/recommended',
],
root: true,
env: {
node: true,
jest: true,
},
ignorePatterns: ['.eslintrc.js'],
rules: {
'@typescript-eslint/interface-name-prefix': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-explicit-any': 'off',
},
};
36 changes: 36 additions & 0 deletions pinata-proxy/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# compiled output
/dist
/node_modules

# Logs
logs
*.log
npm-debug.log*
pnpm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*

# OS
.DS_Store

# Tests
/coverage
/.nyc_output

# IDEs and editors
/.idea
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace

# IDE - VSCode
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
.env
4 changes: 4 additions & 0 deletions pinata-proxy/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"singleQuote": true,
"trailingComma": "all"
}
18 changes: 18 additions & 0 deletions pinata-proxy/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
FROM node:18.17.0-alpine

ENV NODE_ENV=production
RUN npm install -g @nestjs/cli
RUN npm i -g [email protected]
RUN npm i -g nest

WORKDIR /app
RUN npm i @types/node
RUN npm i @types/multer
COPY ["package.json", "package-lock.json", "./"]
RUN npm install

COPY ["tsconfig.json", "tsconfig.build.json", "./"]
COPY ./src ./src/
RUN npm run build

CMD [ "node", "dist/main.js" ]
5 changes: 5 additions & 0 deletions pinata-proxy/nest-cli.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"$schema": "https://json.schemastore.org/nest-cli",
"collection": "@nestjs/schematics",
"sourceRoot": "src"
}
Loading