fix vercel deployment

This commit is contained in:
Jonathan Lee 2022-07-31 20:53:22 -04:00
parent 8b717e88a8
commit dc552f3ca1
11 changed files with 2728 additions and 988 deletions

BIN
.DS_Store vendored Normal file

Binary file not shown.

View File

@ -1,9 +1,6 @@
/*
!api
!build
!packages
!config.json
!public
!src
!package.json
!tsconfig.json
!lerna.json
!yarn.lock

View File

@ -41,18 +41,16 @@ npm install
From the command line, run this command:
```shell
cp .env.example .env
cp packages/server/.env.example packages/server/.env
```
In your editor, open the `.env` file.
In your editor, open the `packages/server/.env` file.
![Edit .env file](setup/3_edit_env_file.png)
The values containing `__PLACEHOLDER__` need to be changed.
- `SECRET_KEY` is the base58 encoded secret key that Octane will sign transactions with.
- `TRANSFER_MINT` is the base58 encoded public key of an SPL token mint.
- `TRANSFER_ACCOUNT` is the base58 encoded public key of an SPL token account corresponding to this mint.
Let's start by creating a keypair and minting a token to test with.
@ -69,6 +67,13 @@ The last command will silently copy the base58 encoded secret key to your clipbo
Update the value of `SECRET_KEY` in your .env file with it, and save the file.
Now, open the `config.json` file.
These `__PLACEHOLDER__` values must also change.
- `TRANSFER_MINT` is the base58 encoded public key of an SPL token mint.
- `TRANSFER_ACCOUNT` is the base58 encoded public key of an SPL token account corresponding to this mint.
From the command line, run these commands:
```shell
solana airdrop 1
@ -81,7 +86,7 @@ After the last command, you should see:
Creating token <base58 encoded TRANSFER_MINT public key>
```
Copy this **TRANSFER_MINT** public key, update the value of `TRANSFER_MINT` in your .env file with it, and save the file.
Copy this **TRANSFER_MINT** public key, update the value of `TRANSFER_MINT` in your `config.json` file with it, and save the file.
From the command line, run these commands:
```shell
@ -99,7 +104,9 @@ Minting 100 tokens
Recipient: <base58 encoded TRANSFER_ACCOUNT public key>
```
Copy this **TRANSFER_ACCOUNT** public key, update the value of `TRANSFER_ACCOUNT` in your .env file with it, and save the file.
Copy this **TRANSFER_ACCOUNT** public key, update the value of `TRANSFER_ACCOUNT` in your `config.json` file with it, and save the file.
Now, commit and push your changes to the fork.
You're ready to deploy Octane.
@ -127,6 +134,12 @@ You should see:
![Vercel configure project](setup/6_vercel_configure_project.png)
Edit the **Root Directory** section to `./packages/server`
Expand the *Build and Output Settings* section.
Under **Build Command**, toggle the slider for **Override** and put `cd ../.. && yarn build`.
Expand the **Environment Variables** section.
From your .env file, copy and paste the names and values of each environment variable and click the **Add** button.

View File

@ -4,5 +4,7 @@
],
"useNx": false,
"version": "0.0.0",
"npmClient": "yarn"
"npmClient": "yarn",
"$schema": "node_modules/lerna/schemas/lerna-schema.json",
"useWorkspaces": true
}

View File

@ -21,5 +21,8 @@
"eslint-plugin-prettier": "^4.2.1",
"prettier": "^2.7.1",
"typescript": "^4.7.4"
}
},
"workspaces": [
"packages/*"
]
}

View File

@ -1,4 +1,3 @@
node_modules
api
build

View File

@ -4,7 +4,7 @@
"node": true,
"es6": true
},
"extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended"],
"extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended", "plugin:@next/next/recommended"],
"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint", "prettier"],
"rules": {

View File

@ -18,6 +18,7 @@
"nuke": "shx rm -rf node_modules yarn.lock"
},
"dependencies": {
"@solana/octane-core": "*",
"@solana/web3.js": "^1.48.0",
"bs58": "^5.0.0",
"cache-manager": "^4.1.0",
@ -25,11 +26,11 @@
"express": "^4.18.1",
"express-rate-limit": "^6.4.0",
"next": "^12.1.0",
"@solana/octane-core": "*",
"react": "^17.0.2",
"react-dom": "^17.0.2"
},
"devDependencies": {
"@next/eslint-plugin-next": "^12.2.3",
"@types/bs58": "^4.0.1",
"@types/cache-manager": "^3.4.2",
"@types/cors": "^2.8.12",

Binary file not shown.

Before

Width:  |  Height:  |  Size: 475 KiB

After

Width:  |  Height:  |  Size: 295 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 224 KiB

After

Width:  |  Height:  |  Size: 106 KiB

3669
yarn.lock

File diff suppressed because it is too large Load Diff