Skip to content

Commit b94bb3e

Browse files
committed
update readme and env varaible for AWS keystore
1 parent a46eab7 commit b94bb3e

File tree

5 files changed

+609
-20
lines changed

5 files changed

+609
-20
lines changed

.env.example

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,8 @@ DB_USERNAME=cassandra-user # Replace with your Cassandra username
44
DB_PASSWORD=cassandra-password # Replace with your Cassandra password
55
DB_LOCAL_DATACENTER=datacenter1 # Replace with your Cassandra datacenter name
66
DB_KEYSPACE=college # Replace with your Cassandra keyspace name
7+
8+
AWS_ACCESS_KEY_ID=aws_access_key
9+
AWS_SECRET_ACCESS_KEY=aws_secret_access_key
10+
AWS_SESSION_TOKEN=aws_session_key
11+
DB_IS_AWS_KEYSPACES=True

README.md

Lines changed: 24 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,33 @@ You can start editing the page by modifying `app/page.tsx`. The page auto-update
2020

2121
This project uses [`next/font`](https://nextjs.org/docs/app/building-your-application/optimizing/fonts) to automatically optimize and load [Geist](https://vercel.com/font), a new font family for Vercel.
2222

23-
## Set up environment variables
24-
Create a .env.local file in the root of the project and set the following environment variables:
25-
23+
## Set up Environment Variables
24+
Create a .env.local file in the root of the project and set the following environment variables based on whether you're connecting to a local Cassandra instance or AWS Keyspaces.
25+
26+
### For Local Cassandra:
27+
```env
28+
# Local Cassandra connection settings
29+
DB_IS_AWS_KEYSPACES=false # Set to 'false' for local Cassandra, 'true' for AWS Keyspaces
30+
DB_CONTACT_POINTS=localhost # Replace with your local Cassandra host URL or Docker container IP
31+
DB_LOCAL_DATACENTER=datacenter1 # Replace with your Cassandra data center name (typically 'datacenter1')
32+
DB_KEYSPACE=your_keyspace # Replace with your Cassandra keyspace name
33+
DB_USERNAME=cassandra # Replace with your Cassandra username (if applicable)
34+
DB_PASSWORD=cassandra # Replace with your Cassandra password (if applicable)
2635
```
27-
# Cassandra connection settings
28-
DB_URL=cassandra-db-hostname # Replace with your Cassandra host URL
29-
DB_USERNAME=cassandra-user # Replace with your Cassandra username
30-
DB_PASSWORD=cassandra-password # Replace with your Cassandra password
31-
CASSANDRA_LOCAL_DATACENTER=datacenter1 # Replace with your Cassandra data center name
32-
CASSANDRA_KEYSPACE=college # Replace with your Cassandra keyspace name
36+
### For AWS Keyspaces:
37+
```env
38+
# AWS Keyspaces connection settings
39+
DB_IS_AWS_KEYSPACES=true # Set to 'true' for AWS Keyspaces
40+
DB_CONTACT_POINTS=cassandra.us-east-1.amazonaws.com # AWS Keyspaces endpoint (replace with your region if necessary)
41+
DB_LOCAL_DATACENTER=us-east-1 # Replace with your AWS region (e.g., 'us-east-1')
42+
DB_KEYSPACE=your_keyspace # Replace with your AWS Keyspace name
43+
AWS_ACCESS_KEY_ID=your_access_key_id # Your AWS access key ID
44+
AWS_SECRET_ACCESS_KEY=your_secret_access_key # Your AWS secret access key
45+
AWS_SESSION_TOKEN=your_session_token # (Optional) Your AWS session token if using temporary credentials
3346
```
3447

48+
Note: Set DB_IS_AWS_KEYSPACES to true if you're using AWS Keyspaces, and false if you're connecting to a local Cassandra instance. The rest of the environment variables will adjust accordingly based on this setting.
49+
3550
## Run the development server
3651
Start the Next.js development server:
3752

0 commit comments

Comments
 (0)