FORGE_DB_CREATION_REQUIRED unclear
Closed this issue · 6 comments
I've set this to 'true' but it's never making a new database.
It seems that it might only do it when a site is first created, which... OK. I can deal with that, except, it's not creating a database even on a new site creation.
And... there's no guidance on how the new site's database name, user and password would get injected in to an .env or somehow passed to the new site config area.
I'm expecting that each site-per-branch created would have a new database created, with a corresponding randomized(?) user/pass that the new site needs to know about.
Unfortunately, I can't get this to work yet. I don't think this is just me not understanding docs yet, but I'm happy to be wrong. Thanks.
You're right, each new site should automatically have a new database, with the credentials inserted into the .env file.
This issue appears to be connected to issue #24, and the database creation process should now be functioning properly (I would give it a test in a short time and getting back to you soon).
I understand the documentation needs to be more transparent, and I'm committed to enhancing it this week for improved clarity. Thanks for highlighting this matter.
I don't think the db creation is directly tied to #24 but... maybe it is? It's a bit hard to follow all this at the moment, but I will run a test tomorrow.
BTW, thanks for the patience in my learning. I've done this sort of branch-per-pr before, more as a set of scripts in a forge deployment triggered by the URL, not using the forge SDK. I think this approach is generally a bit cleaner, but i'm hitting these stumbling blocks. :)
I'm pleased to see this tool being utilized since its beta release.
Today, I finally had the opportunity to test the 'provision' command and can confirm that the database credentials have been successfully inserted into the .env file.
Reviewing a sample of your env keys might help me identify the issue more quickly.
I was seeing that keys were being created/merged, but the process doesn't always seem to trigger. If there are no 'envkeys' to merge, the merging is skipped (or so it seems). Was getting a bit lost in this today.
Got it! An early return due to missing envKeys could be the culprit. Let's address that.
I would probably write required tests for this process later as well, but with the new changes, I made sure it inserts the DB CREDS to the .env whether any value exists for envKeys
or not. 🚀
I would be happy to help further in case there was any related issue left here.