I created a
spec.yaml file with the line
source_dir: src in it. I created my app and pushed it with
doctl apps create --spec spec.yaml - all good so far.
After a few minutes the build failed, saying it couldn’t find a file that exists in the repo I pointed the spec to, but not within the
src folder. Ok this makes sense:
source_dir should just be the whole folder in my case, rather than
I tried to repair this by:
source_dirline the yaml file
source_dir: ./and then
Every change correctly restarted the build when I pushed it to my repo, so:
github: branch: main deploy_on_push: true
In the spec was working well.
On every rebuild, the
$SOURCE_DIR = src remained, and indeed I’d see
Using build context /workspace/src in the logs, and get the error again.
I expected one of my attempts to correctly set
$SOURCE_DIR to give a build context of just
Perhaps the github setup is correctly causing DO to listen to my repo, but not to update the spec itself.
Or there’s just some bad caching happening, and even my attempts to set
source_dir in the spec didn’t work because they were invalid
I deleted the app, removed the line from the spec and relaunched it. That worked.
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.