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

add SSL flag for RDS postgress support and localhost support #1585

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from

Conversation

JoseRoberts87
Copy link

Relates to:

#1583

Risks

LOW: add way to handle ssl requirements in rds

Background

What does this PR do?

To manage both local and remote postgres db connections, we can add the following:
ssl: process.env.POSTGRES_URL.includes("localhost") ? undefined : { rejectUnauthorized: false }
this will allow for a local host instance or a remote instance connection string

if (process.env.POSTGRES_URL) {
    elizaLogger.info("Initializing PostgreSQL connection...");
    const db = new PostgresDatabaseAdapter({
        connectionString: process.env.POSTGRES_URL,
        parseInputs: true,
        ssl: process.env.POSTGRES_URL.includes("localhost")
            ? undefined
            : { rejectUnauthorized: false },
    });```

What kind of change is this?

Features (non-breaking change which adds functionality)

Documentation changes needed?

My changes require a change to the project documentation.

Testing

Where should a reviewer start?

Detailed testing steps

None, automated tests are fine.

Screenshots

Before

After

Deploy Notes

Database changes

Deployment instructions

Discord username

joseroberts87

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @JoseRoberts87! Welcome to the ai16z community. Thanks for submitting your first pull request; your efforts are helping us accelerate towards AGI. We'll review it shortly. You are now a ai16z contributor!

@twilwa
Copy link
Contributor

twilwa commented Dec 31, 2024

Hi there, changes need to be made to 'develop' before main, would you mind editing this accordingly? Also; ideally, include the documentation changes in your feature changes when possible; the .md files in the repo should be kept up to date in sync with code changes.

@odilitime odilitime changed the base branch from main to develop January 1, 2025 07:05
@ryanleecode
Copy link
Contributor

Can't you just add ?sslmode=require to the end of the url?

Copy link
Author

@JoseRoberts87 JoseRoberts87 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can someone run the tests?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants