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

feat: add production database connection to payload #23

Draft
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

maneike
Copy link
Collaborator

@maneike maneike commented Nov 6, 2024

This PR introduces dynamic environments for Payload CMS, Vercel and local.

@maneike maneike requested a review from Pmejna November 6, 2024 15:46
@maneike maneike self-assigned this Nov 6, 2024
@maneike maneike force-pushed the feat/add-prod-db-connection-to-payload branch from 802a490 to 9c27786 Compare November 6, 2024 15:54
@goszczynskip
Copy link
Member

Check how I managed to resolve this issue in boring stack. Here's PR code https://github.com/tonik/boring-stack/pull/35/files

@maneike maneike force-pushed the feat/add-prod-db-connection-to-payload branch from 6d447de to 93f7ef4 Compare November 7, 2024 11:15
@maneike maneike marked this pull request as ready for review November 7, 2024 11:16
},
})`;

data = data.replace(
Copy link
Member

Choose a reason for hiding this comment

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

this place can produce errors if the payload changes the name for postgresAdapter.

Have you considered using a codemod here and replacing it via AST?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is a great idea! I think we should introduce codemods globally across the whole app when it comes to reading and writing files. This, however, will be done in a separate PR.

@maneike maneike marked this pull request as draft November 7, 2024 12:05
@maneike maneike changed the title Feat/add prod db connection to payload feat: add production database connection to payload Nov 12, 2024
@maneike maneike force-pushed the feat/add-prod-db-connection-to-payload branch from 330c96d to d40ce80 Compare November 14, 2024 12:20
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.

2 participants