Closed matsest closed 4 years ago
Also: did not get the photo upload to work on the published app. Is this something that should work? @ntrogh ~If so, I guess my connection string for the sql server is off..~ I guess this relies on the (to be deployed?) backend if I understand the doc correctly. No worries.
Hi @matsest, I have the same problem; I have enabled Application Insights and I obtain this error on
POST /products/imageclassifier
The SPA default page middleware could not return the default page '/index.html' because it was not found, and no other middleware handled the request.
Your application is running in Production mode, so make sure it has been published, or that you have built your SPA manually. Alternatively you may wish to switch to the Development environment.
Do you have a similar issue?
@salem84 I haven't checked app insights, but as far as I can see from the docs here this demands the application backend to be set up (deployed). Guess this will come as one of the coming days challenges.
I checked the database contents in Azure, and it's functional (as the products are placed there).
My bad! I have missed /api/v1 on app settings! We will check next days for coming challenges :-)
Thanks for participating in the #TerraformOnAzure coding challenges! We have attached your very special Astronaut Badger background, for you to use in all your upcoming video calls!
And to recognize you for your learning, you can collect your digital Azure Heroes badge on your mobile (you may need to install the Enjin wallet to collect it). Make sure to collect it today! https://beam.enjin.io/claim/d32599695c8c28cfc24820492080fac0
Keep on learning and sharing!
Greetings from the #TerraformOnAzure team, Suzanne, Floor, Erik & Nick
Please provide the following information for your submission:
What is your name? (First, Last)
Mats, Estensen
Where is your GitHub Repo ?(With your challenge solution)
https://github.com/matsest/AzureEats-Website/tree/challenge-02
What Challenge is this for? (Challenge number between 1 and 5)
2
Live website: https://mats-azureeats-website-with-db.azurewebsites.net/
(Optional) Anything else we should know? e.g., language used, location, blog post?
tried to do the terraform part using github actions again, not keeping secrets (db admin pw) in terraform.tfvars but in github actions secrets
not satisifed with the terraform code on this. not very re-usable or extensible. will have to refactor if continuing challenge 3 based on this.
used a module for the sql part. Seemed to be a module that creates a new resource group, which was not desirable here, so a hacky workaround for my part. Also it was a terraform 0.11 based module, which created some syntax deprecation warnings.
had some hard time trying to do all the configuration without hardcoding too much. Especially referring to the container port for the mongodb connection string in the app settings with a resource attribute. The nested blocks stopped me..
Manually configured the Deployment Center in the portal and connected to the github repo. Build took more time than GitHub actions yesterday, but easy enough to set up.
edit: I think I've managed to configure authentication for the mongodb container with environment variables - but not sure if this works as intended. how to verify?
Location: Oslo, Norway
Blog post: might come @ mxe.no