Document relevant environment variables
This commit is contained in:
parent
a6f884e3c8
commit
39f2d7c4eb
63
README.md
63
README.md
@ -20,7 +20,17 @@ A simple Next.js frontend that allows users to pay in GOR tokens (configurable S
|
||||
- Solana wallet browser extension (Phantom or Solflare)
|
||||
- Access to a Laconic Registry node
|
||||
|
||||
## Environment Variables
|
||||
## Deploy to production
|
||||
|
||||
Follow [these steps](./deploy/README.md) to deploy this app to production
|
||||
|
||||
## Installation
|
||||
|
||||
```bash
|
||||
npm install
|
||||
```
|
||||
|
||||
## Development
|
||||
|
||||
Copy the `.env.example` file to `.env.local` and fill in the required variables:
|
||||
|
||||
@ -51,14 +61,6 @@ Server-side:
|
||||
- `REGISTRY_USER_KEY` - The private key for Laconic Registry transactions (also used for LNT transfers)
|
||||
- `DEPLOYER_LRN` - The LRN of the deployer
|
||||
|
||||
## Installation
|
||||
|
||||
```bash
|
||||
npm install
|
||||
```
|
||||
|
||||
## Development
|
||||
|
||||
```bash
|
||||
npm run dev
|
||||
```
|
||||
@ -131,43 +133,6 @@ This application was built with reference to:
|
||||
- `snowballtools-base/packages/backend/src/registry.ts`
|
||||
- Original `hosted-frontends/deploy-atom.sh` (adapted for Solana/GOR)
|
||||
|
||||
## Deployment to Production
|
||||
|
||||
To deploy this application to production, follow these steps:
|
||||
|
||||
1. Clone the repository
|
||||
2. Install dependencies: `npm install`
|
||||
3. Create a production build: `npm run build`
|
||||
4. Set up all required environment variables in your production environment
|
||||
5. Start the production server: `npm start`
|
||||
|
||||
For containerized deployments, you can use the following Dockerfile:
|
||||
|
||||
```dockerfile
|
||||
FROM node:18-alpine
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY package*.json ./
|
||||
RUN npm ci
|
||||
|
||||
COPY . .
|
||||
RUN npm run build
|
||||
|
||||
EXPOSE 3000
|
||||
|
||||
ENV NODE_ENV=production
|
||||
|
||||
CMD ["npm", "start"]
|
||||
```
|
||||
|
||||
Build and run the Docker container:
|
||||
|
||||
```bash
|
||||
docker build -t gor-deploy .
|
||||
docker run -p 3000:3000 --env-file .env.production gor-deploy
|
||||
```
|
||||
|
||||
## Known Issues
|
||||
|
||||
- You may see a deprecated Buffer() warning during build. This comes from dependencies in the registry-sdk. This doesn't affect functionality.
|
||||
@ -182,12 +147,6 @@ docker run -p 3000:3000 --env-file .env.production gor-deploy
|
||||
- **Connection issues**: Ensure the wallet is unlocked and try refreshing the page.
|
||||
- **Transaction failures**: Check that you have sufficient SOL for transaction fees and enough tokens for the payment.
|
||||
|
||||
### Token Configuration
|
||||
|
||||
- **Wrong token**: Verify the `NEXT_PUBLIC_SOLANA_TOKEN_MINT_ADDRESS` matches your desired SPL token.
|
||||
- **Incorrect decimals**: Ensure `NEXT_PUBLIC_SOLANA_TOKEN_DECIMALS` matches the token's actual decimal count.
|
||||
- **Payment amount**: Adjust `NEXT_PUBLIC_SOLANA_PAYMENT_AMOUNT` to the desired payment amount.
|
||||
|
||||
### Laconic Registry Issues
|
||||
|
||||
- **Failed to create record**: Check that your REGISTRY_USER_KEY and REGISTRY_BOND_ID are correctly set.
|
||||
|
||||
@ -61,7 +61,23 @@
|
||||
# Fill in the required values
|
||||
nano .app.env
|
||||
```
|
||||
<!-- TODO: Document relevant env variables -->
|
||||
|
||||
- Required environment variables:
|
||||
|
||||
Client-side (must be prefixed with NEXT_PUBLIC_):
|
||||
- `NEXT_PUBLIC_SOLANA_RPC_URL` - The RPC URL for the Solana blockchain (SPL token transactions)
|
||||
- `NEXT_PUBLIC_GORBAGANA_RPC_URL` - The RPC URL for the Gorbagana blockchain (native GOR transactions)
|
||||
- `NEXT_PUBLIC_ENABLE_NATIVE_GOR_TRANSFER` - Enable native GOR token transfers (true/false)
|
||||
- `NEXT_PUBLIC_SOLANA_TOKEN_RECIPIENT_ADDRESS` - The Solana address that will receive token payments
|
||||
- `NEXT_PUBLIC_ALNT_COST_LRN` - LRN for ALNT token pricing
|
||||
- `NEXT_PUBLIC_DEPLOYMENT_COST_LRN` - LRN for deployment cost pricing
|
||||
- `NEXT_PUBLIC_DOMAIN_SUFFIX` - Suffix to append to DNS names in the UI (e.g. ".example.com")
|
||||
|
||||
Server-side:
|
||||
- `REGISTRY_BOND_ID` - The bond ID to use for Laconic Registry records
|
||||
- `REGISTRY_AUTHORITY` - The authority for Laconic Registry LRNs
|
||||
- `REGISTRY_USER_KEY` - The private key for Laconic Registry transactions (also used for LNT transfers)
|
||||
- `DEPLOYER_LRN` - The LRN of the deployer
|
||||
|
||||
## Run
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user