Report this

What is the reason for this report?

How to include state files in python build?

Posted on October 6, 2021

Connected Tutorial(This question is a follow-up to this tutorial):

How To Deploy a Static Website to the Cloud with DigitalOcean App Platform

I need to include both python and static files in my site. I’ve added a static component as well a python one but am getting errors “! Directory /workspace/static does not exist” for the output dir. What is the output dir? Should I have created it and if so how? Or is this an internal bug?



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.

Ok, so it looks like I may have fixed this. What I did was delete the static component. I then changed the request route of the python component so that it wasn’t just ‘/’ and added a new folder to the repo to keep static files in and added an ‘index.html’ file. The site now serves both python and static files. It’s difficult to know what fixed the issue but my best guess is that the static component expects there to be an ‘index.html’ file and if it doesn’t find one it gives errors

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.