I have been dealing with an issue on my personal website, It has been randomly showing a nginx 502 bad gateway error, and I have no means of debugging.
More info: it’s hosted on the app platform static website feature and is built with a dockerfile using astro, here’s the repo if anyone’s interested.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Sign up for Infrastructure as a Newsletter.
Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Hi there,
What I could suggest is to deploy your app as a static site rather than using a Dockerfile. That way the website assets will be compiled during the build stage and then you will not need to run a Docker container with Nginx installed.
What you might have to do is define Node.js 18.x as the version as your app does not seem to work with the default 16.x. You can do that by adding the following to your
package.json
and then runningnpm update
and push that to your repository:Here is a step by step tutorial on how to deploy a static website on the App Platform:
As a test, I forked your repository and tried to deploy it that way and can confirm that it was successful.
Let me know if you have any questions!
Best,
Bobby