By Jenryk
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!
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 running npm update and push that to your repository:
"engines": {
"node": "18.x"
}
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
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.