I zipped the build folder and using curl posted that to server:
curl -X POST -u $User --data-binary @“C:\Users\Administrator\Desktop\build.zip” Sign in to your account
thanks for pointing this, I actually tried to deploy everything, but it couldn’t upload everything, after a time a got errors with response to server error.
I try to zip deploy to Azure as a web app using this tutorial : github-strapi-web-app
the last steps I did:
yarn build setting ENV=Production
then zip a strapi project and using that same curl command to upload it
could be the problem, is that Strapi does not recommend deploying to Azure as a web app?
We don’t recommend the serverless side of Azure as it certainly was not designed with applications like Strapi in mind. I have spend an ungodly amount of time trying to make it work properly with at least decent performance (I’ve never gotten it to successfully deploy).
ok, so should I just forget trying to deploy as a web app then. I mean even if it will work from my understanding it wouldn’t work properly though as a webapp as it was not intended so
I am going try again, to upload the whole project using curl, if not then will go for official setup. Its just that my boss asked to deploy as a webapp, so I thought give it a try, found tutorial. But yes I see the downfalls and why its not advised initially. Thanks @DMehaffy will post here if I got it to work as a webapp, maybe someone else trying…
If anyone else has experience in the community (and you are reading this) who is willing to contribute a detailed guide to the documentation on Azure webapp deployment I would love to see a PR for it.
I’m fairly certain trying to write that guide myself has contributed to about a 20% hair loss on my head.
I got it definitely working on an App Service as a docker container, that is how it is working for me atm … but i mean i got it also working as a nodejs deployment. For the later one i have to work it out again. I will not promise something, but i think i could do the task.
the container builds fine but it will not connect to a remote sql server for love nor money - it seems like it ignores all environment variables set in the azure admin. In fact despite the docker file being set to production AND even my database.js is only setup for mysql the container deploys with a local sqllite db - its driving me nuts.
well, the problem could be your project structure.
The default one - on the root level of the config folder - is the one which is used for the staging and production stages. Both stages has their own MySQL Database and both will be deployed as a docker container. Here how it looks…
My Configuration within the App Service looks like the following…
The Docker File in the linked project, is copying everything to the destination. In my case I am only copying selected folders/files to the destination.
That is how it works for me, I got it also to work as a plain nodejs deployment, but this runs as also as a docker container at the end, bc of that I didn´t wrote something about that. If someone is interested here is the Build pipeline: