-
Hi everyone, I'm developing some headless microservices within the same solution, and I'm trying to use the same database that is running in my "Docker desktop", for the same Orchard Core app (I will call it A here):
The database is internally exposed by Docker, and also made available to the The first time I started my app (A), I configured running it through Docker. Now, I'm attempting to use the same database with the app (A) running in Visual Studio, but each time it starts, the "initial configuration" page of Orchard Core appears, as if it's a first run and the database is not set up. Upon checking the documentation, I noticed the I've tried configuring the {
"OrchardCore": {
"ConnectionString": "Server=localhost;Port=12208;Database=*******;User Id=*******;Password=********",
"DatabaseProvider": "Postgres"
}
} This one instead ends in a 404 http error: {
"OrchardCore": {
"ConnectionString": "Server=localhost;Port=12208;Database=*******;User Id=*******;Password=********",
"DatabaseProvider": "Postgres",
"Default": {
"State": "Running",
"TablePrefix": "Default"
}
}
} Note that to create my Orchard Core app, I used the "code generation template" available in Visual Studio, in the template list it appears as "Orchard Core CMS Web App". The question is: how can I use the same Orchard Core headless app, across environments, with the same database? Thank you |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
I've done a comparison between the Those are two different projects, both using Orchard Core 1.8.2. They use two different databases, Docker uses Below are some screenshots for comparison, where:
Starting with the This screenshot show the contents of the Next, we look at what's inside the Finally, this screenshot displays the XML file inside the My question is: why are the @Piedone is there someone from Lombiq that could clarify this situation and advise on how to configure both environments for the same Orchard Core site? Could this be indicative of a bug? Thank you so much |
Beta Was this translation helpful? Give feedback.
-
Upon launch, OC will check the App_Data folder for tenant settings, unless you use one of the other Shells Configuration Providers). If none are found, it'll show you the setup screen. If a matching one is found, it'll try to connect to its configured DB; if there are any issues after this, startup will fail. Your screenshots suggest that the Docker version of the app is running a different Shells Configuration Provider. Didn't you configure that? BTW I believe in your original question you meant app B for the VS one. |
Beta Was this translation helpful? Give feedback.
@Piedone thank you for your reply 😊
No, in my original question, I was referring to the Orchard Core app "A" for both Docker and Visual Studio. This is because I need to develop and debug the Orchard Core app and I need Visual Studio, but in the meantime, another instance of this Orchard Core app "A" is running on a local Docker Desktop, where I'm testing it with other microservices. Of course I update the Docker image every time I have new code in the Visual Studio app "A" version.
No, I haven't configured different "Shells Configuration Providers".
In conclusion, I was able to use the same Orchard Core headless app across both environments, Docker and Visual Studio, with the same databa…