-
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.
# Conflicts: # .github/workflows/build-explorer-to-k8s.yml # .github/workflows/build-indexer-to-k8s.yml
- Loading branch information
Showing
208 changed files
with
10,862 additions
and
57 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 |
---|---|---|
@@ -0,0 +1,110 @@ | ||
name: Pinata-proxy - Build and Deploy | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: ['master', 'main', 'staging'] | ||
paths: | ||
- pinata-proxy/** | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
env: | ||
ENVIRONMENT: ${{ (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main') && 'prod' || 'stg' }} | ||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
AWS_REGION: ${{ secrets.AWS_REGION }} | ||
KUBE_CONFIG_DATA: ${{ secrets.KUBE_CONFIG_DATA }} | ||
KUBECTL_VERSION: 'v1.22.17' | ||
KUBE_NAMESPACE: gear-dapps | ||
KUBE_DEPLOYMENT_PREFIX: pinata-proxy | ||
REGISTRY: ghcr.io/${{ github.repository }} | ||
|
||
jobs: | ||
prepair: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
image_name: ${{ steps.image.outputs.image_name }} | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Get branch | ||
id: branch | ||
run: | | ||
branch_name=${GITHUB_REF#refs/heads/} | ||
echo "branch_name=$branch_name" >> $GITHUB_ENV | ||
- name: Get short SHA | ||
id: sha | ||
run: | | ||
sha_short=$(git rev-parse --short HEAD) | ||
echo "sha_short=$sha_short" >> $GITHUB_ENV | ||
- name: Set IMAGE_NAME | ||
id: image | ||
run: | | ||
image_name=${{ env.REGISTRY }}-${{ env.KUBE_DEPLOYMENT_PREFIX }}:${{ env.branch_name }}-${{ env.sha_short }} | ||
echo "image_name=$image_name" >> $GITHUB_OUTPUT | ||
build-and-push-image: | ||
needs: [prepair] | ||
runs-on: ubuntu-latest | ||
environment: ${{ (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main') && 'prod' || 'stg' }} | ||
permissions: | ||
contents: read | ||
packages: write | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Log in to the github container registry | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ${{ env.REGISTRY }} | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Build and push image | ||
uses: docker/build-push-action@v5 | ||
with: | ||
file: indexer/Dockerfile-indexer | ||
push: true | ||
tags: ${{ needs.prepair.outputs.image_name }} | ||
|
||
deploy-to-k8s: | ||
needs: [prepair, build-and-push-image] | ||
runs-on: ubuntu-latest | ||
environment: ${{ (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main') && 'prod' || 'stg' }} | ||
steps: | ||
- name: Configure AWS credentials | ||
uses: aws-actions/configure-aws-credentials@v4 | ||
with: | ||
aws-access-key-id: ${{ env.AWS_ACCESS_KEY_ID }} | ||
aws-secret-access-key: ${{ env.AWS_SECRET_ACCESS_KEY }} | ||
aws-region: ${{ env.AWS_REGION }} | ||
|
||
- name: Update deployment image | ||
uses: kodermax/kubectl-aws-eks@main | ||
with: | ||
args: | | ||
set image deployment/${{ env.KUBE_DEPLOYMENT_PREFIX }}-${{ env.ENVIRONMENT }} \ | ||
${{ env.KUBE_DEPLOYMENT_PREFIX }}-${{ env.ENVIRONMENT }}=${{ needs.prepair.outputs.image_name }} \ | ||
-n ${{ env.KUBE_NAMESPACE }} | ||
- name: Restart deployment | ||
uses: kodermax/kubectl-aws-eks@main | ||
with: | ||
args: | | ||
rollout restart deployment/${{ env.KUBE_DEPLOYMENT_PREFIX }}-${{ env.ENVIRONMENT }} \ | ||
-n ${{ env.KUBE_NAMESPACE }} | ||
- name: Check deployment | ||
uses: kodermax/kubectl-aws-eks@main | ||
with: | ||
args: | | ||
rollout status deployment/${{ env.KUBE_DEPLOYMENT_PREFIX }}-${{ env.ENVIRONMENT }} \ | ||
--timeout=240s \ | ||
-n ${{ env.KUBE_NAMESPACE }} |
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
VITE_NODE_ADDRESS= | ||
VITE_IPFS_ADDRESS= | ||
VITE_CONTRACT_ADDRESS= |
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 |
---|---|---|
@@ -0,0 +1,66 @@ | ||
{ | ||
"root": true, | ||
"env": { "browser": true, "es2020": true }, | ||
|
||
"extends": [ | ||
"eslint:recommended", | ||
"plugin:react/recommended", | ||
"plugin:react-hooks/recommended", | ||
"plugin:react/jsx-runtime", | ||
"plugin:import/recommended", | ||
"plugin:jsx-a11y/recommended", | ||
"prettier" | ||
], | ||
|
||
"settings": { | ||
"ecmaVersion": "latest", | ||
"react": { | ||
"version": "detect" | ||
}, | ||
"import/resolver": { | ||
"typescript": true | ||
} | ||
}, | ||
|
||
"plugins": ["react", "react-hooks", "import", "jsx-a11y", "react-refresh"], | ||
|
||
"overrides": [ | ||
{ | ||
"files": ["*.ts", "*.tsx"], | ||
|
||
"parser": "@typescript-eslint/parser", | ||
"parserOptions": { "project": ["./tsconfig.json", "./tsconfig.node.json"] }, | ||
|
||
"extends": [ | ||
"plugin:@typescript-eslint/eslint-recommended", | ||
"plugin:@typescript-eslint/recommended", | ||
"plugin:@typescript-eslint/recommended-requiring-type-checking", | ||
"plugin:import/typescript" | ||
], | ||
|
||
"plugins": ["@typescript-eslint/eslint-plugin"], | ||
|
||
"rules": { | ||
// airbnb cfg | ||
"no-shadow": "error", | ||
"no-shadow-restricted-names": "error", | ||
|
||
// dx | ||
"@typescript-eslint/no-unused-vars": "warn", | ||
|
||
// react-hook-form onSubmit | ||
"@typescript-eslint/no-misused-promises": [2, { "checksVoidReturn": { "attributes": false } }], | ||
|
||
// import sort | ||
"import/order": [ | ||
1, | ||
{ | ||
"groups": ["external", "builtin", "internal", "parent", "sibling", "index"], | ||
"newlines-between": "always", | ||
"alphabetize": { "order": "asc" } | ||
} | ||
] | ||
} | ||
} | ||
] | ||
} |
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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
pnpm-debug.log* | ||
lerna-debug.log* | ||
|
||
node_modules | ||
dist | ||
dist-ssr | ||
*.local | ||
|
||
.env* | ||
!.env.example | ||
|
||
# Editor directories and files | ||
.vscode/* | ||
!.vscode/extensions.json | ||
.idea | ||
.DS_Store | ||
*.suo | ||
*.ntvs* | ||
*.njsproj | ||
*.sln | ||
*.sw? |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
save-exact=true |
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"singleQuote": true, | ||
"trailingComma": "all", | ||
"endOfLine": "lf", | ||
"printWidth": 120, | ||
"semi": true, | ||
"bracketSpacing": true, | ||
"bracketSameLine": true, | ||
"arrowParens": "always", | ||
"tabWidth": 2 | ||
} |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
# Vara NFT Marketplace |
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<link rel="icon" type="image/svg+xml" href="/favicon.svg" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>Vara NFT Marketplace</title> | ||
</head> | ||
<body> | ||
<div id="root"></div> | ||
<script type="module" src="/src/main.tsx"></script> | ||
</body> | ||
</html> |
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 |
---|---|---|
@@ -0,0 +1,49 @@ | ||
{ | ||
"name": "frontend", | ||
"private": true, | ||
"version": "0.0.1", | ||
"type": "module", | ||
"scripts": { | ||
"start": "vite --open", | ||
"build": "tsc && vite build", | ||
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0", | ||
"preview": "vite preview" | ||
}, | ||
"dependencies": { | ||
"@gear-js/api": "0.35.2", | ||
"@gear-js/react-hooks": "0.9.5", | ||
"@gear-js/vara-ui": "0.0.6", | ||
"@hookform/resolvers": "3.3.3", | ||
"@polkadot/api": "10.10.1", | ||
"@polkadot/api-derive": "10.10.1", | ||
"@polkadot/react-identicon": "3.6.4", | ||
"@polkadot/types": "10.10.1", | ||
"kubo-rpc-client": "3.0.2", | ||
"react": "18.2.0", | ||
"react-dom": "18.2.0", | ||
"react-hook-form": "7.49.2", | ||
"react-router-dom": "6.21.0", | ||
"zod": "3.22.4" | ||
}, | ||
"devDependencies": { | ||
"@types/react": "18.2.43", | ||
"@types/react-dom": "18.2.17", | ||
"@typescript-eslint/eslint-plugin": "6.14.0", | ||
"@typescript-eslint/parser": "6.14.0", | ||
"@vitejs/plugin-react": "4.2.1", | ||
"eslint": "8.55.0", | ||
"eslint-config-prettier": "9.1.0", | ||
"eslint-import-resolver-typescript": "3.6.1", | ||
"eslint-plugin-import": "2.29.0", | ||
"eslint-plugin-jsx-a11y": "6.8.0", | ||
"eslint-plugin-react": "7.33.2", | ||
"eslint-plugin-react-hooks": "4.6.0", | ||
"eslint-plugin-react-refresh": "0.4.5", | ||
"sass": "1.69.5", | ||
"typescript": "5.2.2", | ||
"vite": "5.0.8", | ||
"vite-plugin-checker": "0.6.2", | ||
"vite-plugin-node-polyfills": "0.17.0", | ||
"vite-plugin-svgr": "4.2.0" | ||
} | ||
} |
Oops, something went wrong.